I have subclassed an EDIT window. I want to be able to close that window
[list=a][*] when used hits RETURN key or[*] when user clicks on some other window (EDIT window looses focus).[/list=a]
The program will do some processing and hide EDIT window after that.
I have tried following
The problem is that %WM_KILLFOCUS message is also sent by ShowWindow call when processing WM_KEYUP message. Result is that aSub is called twice. How can I prevent this? Am I missing something trivial here?
TIA
Lasse Rantanen
[email protected]
[list=a][*] when used hits RETURN key or[*] when user clicks on some other window (EDIT window looses focus).[/list=a]
The program will do some processing and hide EDIT window after that.
I have tried following
Code:
FUNCTION SubClassProc(hWnd AS LONG, wMsg AS LONG, ...) SELECT CASE wMsg .... CASE %WM_KEYUP IF wParam=13 THEN ShowWindow hWnd, %SW_HIDE CALL aSub END IF CASE %WM_KILLFOCUS ShowWindow hWnd, %SW_HIDE CALL aSub ... END SELECT END FUNCTION
TIA
Lasse Rantanen
[email protected]
Comment