I understand that there is:

Code:
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
which is the main function for the window.

Then there is:
Code:
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
which does the main processing for the window and that the WinMain function calls this function in the "DispatchMessage(&Msg);" call but how do I create a variable in the main function so that it can be accessed in the WndProc function?