_ProcDlgMain	proc	uses ebx edi esi hWnd,wMsg,wParam,lParam

mov eax,wMsg
.if eax == WM_CLOSE
invoke EndDialog,hWnd,NULL
.elseif eax == WM_COMMAND
mov eax,wParam
.if ax == ***
                                                                invoke      ***
.elseif ax == IDM_ABOUT
invoke DialogBoxParam, hInstance, ID_ABOUTDIALOG, hWnd, offset _ProcDlgMain, NULL
.endif

.elseif eax == ***
                                                ***
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret

?
?
?
_ProcDlgMain endp


See the code above, the button "OK" in the dialog "ABOUT" is non-workable, that is to say, when I push the "OK" button, it doesn't close the dialog ! I should push the "" in the top right corner to close the dialog!
Why does this happen?Is it wrong with the code above?
Posted on 2005-10-31 01:38:35 by Eric4ever
The test for WM_COMMAND(IDM_EXIT) and the EndDialog invoke are not in _ProcDlgMain.
Posted on 2005-10-31 02:25:34 by tenkey
Sorry,the code I pasted last time has some mistakes, I have corrected it!

I include the IDM_EXIT in the Dialog Process!
Posted on 2005-10-31 20:49:04 by Eric4ever
You should not call the same Dlgproc for your About dialog.
Posted on 2005-10-31 21:42:23 by roticv
I think so, but where should I put the About dialog if I don't put it in the Dialog Process  "_ProcDlgMain"?
Posted on 2005-10-31 22:03:25 by Eric4ever
Create another dialogproc....
Posted on 2005-10-31 22:07:49 by roticv
Thanks, roticv~~

:)
Posted on 2005-11-01 04:14:13 by Eric4ever