Hey, this is a very nice tutorial for learning/getting started with the Win32 API
http://www.winprog.org/tutorial/
Below info from an article written by someone else here at the forum:
And, if you are using the DarkGDK sdk and need to use your own window procedure function, do this:
// Assign a new default window procedure function for the main window
PrevProc_MainWindow = (WNDPROC)SetWindowLong( g_pGlob->hWnd, GWL_WNDPROC, (LONG)Proc_MainWindow );
Where the last argument passed(LONG)Proc_MainWindow) is the address off your window procedure function.
And call the "old" window procedure function from your procedure function(only when needed though, read the above tut):
return CallWindowProc( PrevProc_MainWindow, g_pGlob->hWnd, message, wParam, lParam );
g_pGlob is declared in the DarkGDK header file: globstruct.h
So you will need to include this.

&

?