int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
ghInst=hInstance;
// TODO: Place code here.
MSG msg;
HACCEL hAccelTable; // Initialize global strings
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadString(hInstance, IDC_AVPHONE3, szWindowClass, MAX_LOADSTRING);
unsigned short i = MyRegisterClass(hInstance); // Perform application initialization:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
} hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_AVPHONE3); // Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
} _Module.Term(); CoUninitialize(); return msg.wParam;
}int APIENTRY WinMain为什么这样定义??谢谢
APIENTRY指什么?
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
ghInst=hInstance;
// TODO: Place code here.
MSG msg;
HACCEL hAccelTable; // Initialize global strings
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadString(hInstance, IDC_AVPHONE3, szWindowClass, MAX_LOADSTRING);
unsigned short i = MyRegisterClass(hInstance); // Perform application initialization:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
} hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_AVPHONE3); // Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
} _Module.Term(); CoUninitialize(); return msg.wParam;
}int APIENTRY WinMain为什么这样定义??谢谢
APIENTRY指什么?
#define APIENTRY WINAPIWINAPI : Use in place of FAR PASCAL in API declarations. If you are writing a DLL with exported API entry points, you can use this for your own APIs