Win32 SDK 添加状态栏Status Bar

#include <commctrl.h> #pragma comment(lib, "comctl32.lib") // 在窗口回调函数的WM_CREATE消息中添加如下代码: case WM_CREATE: { INITCOMMONCONTROLSEX icex;// Ensure that the common control DLL is loaded. icex.dwSize = sizeof(INITCOMMONCONTROLSEX); icex.dwICC = ICC_BAR_CLASSES; InitCommonControlsEx(&icex); HWND hStatus = CreateWindow(STATUSCLASSNAME, _T("StatusBar"), WS_CHILD | WS_VISIBLE | SBARS_SIZEGRIP, 0, 0, 0, 0, hWnd, (HMENU)0x101, hInst, NULL); int nSize[4]={200, 250, 300, -1}; ::SendMessage(hStatus, SB_SETPARTS, sizeof(nSize)/sizeof(nSize[0]), (LPARAM)nSize); } break;

你可能感兴趣的:(null,dll,include)