| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 
 |  
HWND CreateTreeView(HWND hwndParent) 
{ 
RECT r; 
HWND hwndTV; 
 
// La Common Control DLL est chargée 
InitCommonControls(); 
 
// Taille de la fenetre parent 
GetClientRect(hwndParent, &r); 
hwndTV = CreateWindowEx( 
0, 
WC_TREEVIEW, 
"Tree View", 
WS_CHILD | TVS_HASLINES | TVS_HASBUTTONS | TVS_LINESATROOT , 
0, 0, r.right, r.bottom, 
hwndParent, 
(HMENU) IDW_BASE, 
g_hInst, 
NULL); 
 
TreeView_SetBkColor(hwndTV, RGB(255, 255, 255)); 
 
// Initialisation de la liste des images 
if (LoadImageLists(hwndTV) == FALSE) 
{ 
DestroyWindow(hwndTV); 
return (NULL); 
} 
 
return( hwndTV ); 
} | 
Partager