Maybe I am missing something here, but nParam and CINT(LOWRD(lParam))
in the following code snippet should be identical.
The following scenario left me scratching my head for half a day because of the above.
[This message has been edited by Dominic Mitchell (edited May 21, 2000).]
in the following code snippet should be identical.
Code:
LOCAL nParam AS INTEGER LOCAL lParam AS LONG lParam = MAKLNG(&HFFFE, &H201) nParam = LOWRD(lParam) ' redundant nParam = CINT(LOWRD(lParam)) MsgBox FORMAT$(nParam) + CHR$(13) + FORMAT$(CINT(LOWRD(lParam))) |__ |___ -2 (INTEGER) 65534 (WORD not INTEGER)
Code:
CASE %WM_SETCURSOR ' If Windows generates an error when the window is clicked IF (CINT(LOWRD(lParam)) = %HTERROR) AND (HIWRD(lParam) = %WM_LBUTTONDOWN) THEN ' If the window is disabled IF ISFALSE IsWindowEnabled(hWnd) THEN SetWindowPos ghWndDesk, %HWND_TOP, 0, 0, 0, 0, %SWP_NOMOVE OR %SWP_NOSIZE END IF END IF
Comment