Soy completamente nuevo en win32. He estado trabajando en ello las últimas 48 horas.¿Es necesario utilizar InitCommonControlsEx() e InitCommonControls()?
estoy tratando de construir una "red" , y me dieron ejemplos de un control Lista-View y un control Cabecera en msdn.microsoft.com.
El primero llama a la función InitCommonControls() (además de que he leído que esta función está 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, ...
}
El segundo llama a la función 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 ...
}
Parece que estas funciones necesitan la biblioteca comctl32.lib, pero la descarga es un desastre.
Además, he notado que si elimino estas funciones, todo sigue funcionando bien. Entonces, ¿son necesarios?
Gracias!
¡Oh Dios mío! ¡Gracias! No he notado que estaba en c: \ Archivos de programa \ Microsoft SDKs \ Windows \ v6.0A \ Lib – kiewic