I write a program in which I create 2 edit boxes, 2 lists and 2 buttons inside the window - see text below. Program works but when I press tab button to pass from one window to another operation fails. Why?
Thanks, Mike
PS. See attach file for source
Thanks, Mike
PS. See attach file for source
If you want the "dialog box" navigate functions you must call IsDialogMessage in your message loop (yes, even if your window isn't a dialog box)
japheth
japheth
And here is an example of a message loop.
KetilO
Message loop
.while TRUE
invoke GetMessage,addr msg,NULL,0,0
.BREAK .if !eax
invoke IsDialogMessage,hWnd,addr msg
.if !eax
invoke TranslateMessage,addr msg
invoke DispatchMessage,addr msg
.endif
.endw
KetilO
and don't forget to set the WS_TABSTOP windows-style...
oh and you don't have to call translatemsg & dispatchmsg...
isdialogmessage translates and dispatches keyboard msg's
alone, too...
oh and you don't have to call translatemsg & dispatchmsg...
isdialogmessage translates and dispatches keyboard msg's
alone, too...
_Start: invoke GetMessage,ADDR msg,NULL,0,0
test eax, eax
jz _Exit
invoke IsDialogMessage,hWnd,addr msg
jmp _Start
_Exit: mov eax,msg.wParam
ret
...and later...
invoke CreateWindowEx, NULL, ADDR ButtonClassName,ADDR Button1Text,\
WS_CHILD or WS_VISIBLE or WS_TABSTOP or BS_DEFPUSHBUTTON,\
430,30,100,25,hWin,Button1ID,hInstance,NULL
...