:eek
why it is bit of code the unviewing
i do not see this bit of code in turbodebugger32 (borland)
...
...
WndProc proc hWnd:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
.IF uMsg==WM_DESTROY
invoke PostQuitMessage,NULL
.ELSE
invoke DefWindowProc,hWnd,uMsg,wParam,lParam
ret
.ENDIF
xor eax,eax
ret
WndProc endp
...
...
it may be like this?
start.
maincode
invoke DefWindowProc,hWnd,uMsg,wParam,lParam
exitcode
end.
The logic in this piece of code is very untidy. Normally when you process a WM_DESTROY message you simply call PostQuitMessage(). If you need to optionally do something else like save any files first you perform the check in the WM_CLOSE message handling which you can either allow or disallow depending on the choice.
You should call the DefWindowProc() function only at the end of the WndProc procedure as it is the default processing for messages you don't want to process yourself. The exception is a mesage that requires that you return zero where you set EAX to zero and then call RET.