小编thd*_*efm的帖子

错误 LNK1120:1 未解析的外部 - VS13 C

我试图编译这段代码:

#include <windows.h>
#include <commctrl.h>


#define ID_TABCTRL 1
#define ID_EDIT 2
#define BTN_ADD 3
#define BTN_DEL 4
#define BTN_CLR 5
#define MAX_TAB_LEN 15

LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
HWND hTab, hEdit;

int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    PWSTR pCmdLine, int nCmdShow) {

    MSG  msg;
    WNDCLASSW wc = { 0 };
    wc.lpszClassName = L"Tab control";
    wc.hInstance = hInstance;
    wc.hbrBackground = GetSysColorBrush(COLOR_3DFACE);
    wc.lpfnWndProc = WndProc;
    wc.hCursor = LoadCursor(0, IDC_ARROW);

    RegisterClassW(&wc);
    CreateWindowW(wc.lpszClassName, L"Tab control",
        WS_OVERLAPPEDWINDOW | WS_VISIBLE,
        100, 100, 380, 230, 0, …
Run Code Online (Sandbox Code Playgroud)

c winapi unresolved-external visual-studio visual-c++

0
推荐指数
1
解决办法
1290
查看次数