Sono completamente nuovo per win32. Ci sto lavorando da 48 ore.È necessario utilizzare InitCommonControlsEx() e InitCommonControls()?
che sto cercando di costruire una "griglia", e ho avuto esempi di un controllo List-View e un controllo intestazione su msdn.microsoft.com.
Il primo chiama la funzione InitCommonControls() (oltre a leggere questa funzione è obsoleta).
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, ...
}
Il secondo chiama la funzione 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 ...
}
Sembra che queste funzioni abbiano bisogno della libreria comctl32.lib, ma il download è un disastro.
Inoltre ho notato che se rimuovo queste funzioni, tutto continua a funzionare bene. Quindi, sono necessari?
Grazie!
Oh mio dio! Grazie! Non ho notato che era su c: \ Programmi \ Microsoft SDK \ Windows \ v6.0A \ Lib – kiewic