4
我想向我的Win32应用程序添加一个状态栏。我发现我可以使用CreateStatusWindow
函数。我工作得很好,直到我重新调整窗口的大小。见我的代码块的一部分:在Win32应用程序中添加状态栏
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{
HWND hWnd;
hInst = hInstance; // Store instance handle in our global variable
hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
if (!hWnd)
{
return FALSE;
}
CreateStatusWindow(WS_CHILD | WS_VISIBLE, _T("Welcome to SpyWindows"), hWnd, 9000);
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
return TRUE;
}
这里是我的应用程序的主窗口两个printscreens:
我能做些什么有一个良好的状态栏? (I还希望它在更多领域划分)