Hola, We all know: hwnd != hWnd Backstory: I made "hWnd" a global variable so that I can use it in all my SubProcs. In the WndProc I gave as parameters hwnd:DWORD,uMsg:DWORD &on But I used once hWnd in that WndProc and the program compiled but refused to create my main window. Question is: Why didn't it work with hWnd as that was the global one?? My problem is long solved but I'm just wondering... TIA, Jimmy
Perhaps your situation is like this:
You should note that the value of hWnd is set AFTER CreateWindowEx returns. But when the window proc receives WM_CREATE, CreateWindowEx doesn't yet return so hWnd is undefined.
invoke CreateWindowEx,...... mov hWnd,eax ......... WndProc proc hwnd:DWORD, uMsg:DWORD, wParam:DWORD, lParam:DWORD .if uMsg==WM_CREATE ....
Exactly what I did... sounds more than logical when you know about it. Thanks, Jimmy