WCHKsdk.cpp中添加
//Create Status bar
CreateStatusBar();
ShowWindow(g_hFrame, nCmdShow);
UpdateWindow(g_hFrame);
//Create Status bar
CreateStatusBar();
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return (int)msg.wParam;
编译时提示错误:
error C3861: 'CreateStatusBar': identifier not found
WCHKsdk.h中添加identifier。
LRESULT CALLBACK FrameWndProcess(HWND, UINT, WPARAM, LPARAM);
bool CreateStatusBar();
编译时示错误:
fatal error LNK1120: 1 unresolved externals
WCHKsdk.cpp中添加实现代码:
bool CreateStatusBar()
{
return TRUE;
}
将CreateStatusBar内的代码修正。
ghwndStatusbar = CreateWindowEx(0, STATUSCLASSNAME, "", WS_CHILD | WS_VISIBLE, -100, -100, 10, 10, g_hFrame, NULL, (HINSTANCE)GetWindowLong(g_hFrame, GWLP_HINSTANCE), NULL);
编译提示错误:
error C2065: 'ghwndStatusbar': undeclared identifier
error C2065: 'STATUSCLASSNAME': undeclared identifier
定义变量:顺便将frame的类名变量修正了一下
HWND g_hFrame;
HWND g_hStatusBar = NULL;
#define FRAMECLASSNAME "FRAMECLASSNAME"
#define STATUSCLASSNAME "STATUSCLASSNAME"