如何在简单的C ++应用程序中修复“标识符未定义”错误?

时间:2013-01-11 01:59:53

标签: c++ undefined message identifier

我到处搜索,但无济于事。有人能告诉我这段代码有什么问题吗?它给了我“错误:标识符”XXX“未定义”

    #include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow)
{
    MSG msg;
    MyRegisterClass(hInstance);
    if(!InitInstance (hInstance, nCmdShow))
        return false;
    while (GetMessage(&msg, NULL, 0, 0))
    {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }
    return msg.wParam;
}

1 个答案:

答案 0 :(得分:0)

Windows.h中没有MyRegisterClass和InitInstance全局函数