[API]PB Affichage ListView
Bonjour, dans mon programme j'aurai besoin d'un contrôle ListView. A l'aide de plusieurs sources j'ai écris un code source, mais rien à faire, le ListView ne veut pas s'afficher, je vous montre le code :
Auparavant j'initialise :
Code:
1 2 3 4 5
| INITCOMMONCONTROLSEX InitCc;
InitCc.dwSize = sizeof(INITCOMMONCONTROLSEX);
InitCc.dwICC = ICC_LISTVIEW_CLASSES;
InitCommonControlsEx(&InitCc); |
Dans WM_CREATE :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| hListView = CreateWindow(WC_LISTVIEW, 0, LVS_REPORT | WS_VISIBLE | WS_CHILD,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hWnd, 0, hInstance, 0);
ListView_SetExtendedListViewStyleEx(hListView, 0, LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP);
lvc.mask = LVCF_TEXT | LVCF_WIDTH;
lvc.cx = 200;
lvc.pszText = "First";
ListView_InsertColumn(hListView, 0, &lvc);
lvc.pszText = "Second";
ListView_InsertColumn(hListView, 0, &lvc);
lvc.pszText = "Third";
ListView_InsertColumn(hListView, 0, &lvc); |
Je ne comprends pas, une chose doit m'échapper, j'ai dû oublier quelque chose mais je ne vois vraiment pas quoi, si vous aviez une petite idée...
Merci