**********
HINSTANCE and LPSTR, are really new names for DWORD
**********
so can we declare them as a dword? if no then why not?


**********
WndProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
**********
when did we actually invoke the procedure WndProc? I don't see it invoked anywhere in the program insted it was used in the following instruction


**********
mov wc.lpfnWndProc, OFFSET WndProc
**********
which leads me to the next question, since wc.lpfnWndProc is a dword data type how does it call aprocedure? or does windows call the WndProc when we register our window class?

I'm very confused?!?!:stupid:
Posted on 2002-04-20 06:13:49 by code1101
Originally posted by code1101
**********
HINSTANCE and LPSTR, are really new names for DWORD
**********
so can we declare them as a dword? if no then why not?

Yes you can use a DWORD, as HINSTANCE and LPSTR are just typedef'ed in windows.inc as DWORDs



**********
WndProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
**********
when did we actually invoke the procedure WndProc? I don't see it invoked anywhere in the program insted it was used in the following instruction


**********
mov wc.lpfnWndProc, OFFSET WndProc
**********
which leads me to the next question, since wc.lpfnWndProc is a dword data type how does it call aprocedure?

It doesn't call the procedure, it moves the offset of the procedure into the lpfnWndProc member of wc.

or does windows call the WndProc when we register our window class?

Yes, windows calls the procedure at the offset you specified (mov wc.lpfnWndProc, offset WndProc) whenever a message is sent to the window.

edit: windows does not call this when you *register* the window class, but when you *create* a window and while it exists.
Thomas
Posted on 2002-04-20 06:23:35 by Thomas