发表于:2014/8/22 10:37:18
#0楼
#include "stdafx.h"
BOOL InitInstance (HINSTANCE, int);
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
...
}
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{ ...
}
}
如上结构的程序框架,函数是从WINAPI WinMain里面进去,但是Winmain里没有调用WndProc函数的语句,小弟不知道WndProc函数是在哪开始被调用的,求大神解惑,在此谢过先!!
BOOL InitInstance (HINSTANCE, int);
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);
int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
...
}
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{ ...
}
}
如上结构的程序框架,函数是从WINAPI WinMain里面进去,但是Winmain里没有调用WndProc函数的语句,小弟不知道WndProc函数是在哪开始被调用的,求大神解惑,在此谢过先!!