我对win32完全不熟悉.我在过去的48小时里一直在努力.
我正在尝试构建一个"网格",我在msdn.microsoft.com上获得了List-View控件和Header控件的示例 .
第一个调用InitCommonControls()函数(此外我读过这个函数已经过时了).
HWND DoCreateHeader(HWND hwndParent, HINSTANCE hInst)
{
HWND hwndHeader;
RECT rcParent;
HDLAYOUT hdl;
WINDOWPOS wp;
// Ensure that the common control DLL is loaded, and then create
// the header control.
InitCommonControls();
// ...
// hwndHeader = CreateWindowEx(0, WC_HEADER, ...
}
Run Code Online (Sandbox Code Playgroud)
第二个调用InitCommonControlsEx()函数.
HWND CreateListView (HWND hwndParent, HINSTANCE hInst)
{
RECT rcl;
INITCOMMONCONTROLSEX icex;
// Ensure that the common control DLL is loaded.
icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
icex.dwICC = ICC_LISTVIEW_CLASSES;
InitCommonControlsEx(&icex);
// ...
// HWND hWndListView = CreateWindow(WC_LISTVIEW ...
}
Run Code Online (Sandbox Code Playgroud)
似乎这些函数需要comctl32.lib库,但下载它是一团糟.
此外,我注意到如果我删除这些功能,一切都运行良好.那么,他们有必要吗?
谢谢!
| 归档时间: |
|
| 查看次数: |
11361 次 |
| 最近记录: |