|
创建wince SDK ListCtrl控件,不显示,怎么回事
[复制链接]
这是我创建ListCtrl的代码,可是不显示
我在Dialog对话框中拖放了一个ListCtrl也不显示,Wince SDK 不支持ListCtrl吗?
- HWND hWndListView;
- RECT rcl;
- INITCOMMONCONTROLSEX icex;
- // Ensure that the common control DLL is loaded.
- icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
- icex.dwICC = ICC_LISTVIEW_CLASSES;
- InitCommonControlsEx(&icex);
- // Create the list-view window in report view with label
- // editing enabled.
- GetClientRect (hWnd, &rcl);
- hWndListView = CreateWindow (WC_LISTVIEW, L"SysListView32",
- LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,
- 0, 0, 200, 100,
- hWnd, (HMENU) ID_LISTVIEW, hInstance, NULL);
- int nErr = GetLastError();
- LVITEM item;
- item.mask = LVIF_TEXT;
- item.iItem = 0;
- item.iSubItem = 0;
- item.pszText = L"test";
- item.state = 0;
- item.stateMask = 0;
- item.iImage = 0;
- item.lParam = 0;
- LRESULT lr = ::SendMessage(hWndListView, LVM_INSERTITEM, 0, (LPARAM)&item);
复制代码
|
|