Probleme avec InitCommonControlsEx()

Résolu
yag00 Messages postés 9 Date d'inscription lundi 12 mars 2007 Statut Membre Dernière intervention 28 février 2008 - 22 mai 2007 à 23:22
racpp Messages postés 1909 Date d'inscription vendredi 18 juin 2004 Statut Modérateur Dernière intervention 14 novembre 2014 - 23 mai 2007 à 00:06
bonjour, j'ai un probleme avec InitCommonControlsEx()
voila le code :

#define _WIN32_WINNT 0x0501
#define _WIN32_IE 0x500

typedef struct tagINITCOMMONCONTROLSEX {
    DWORD dwSize;
    DWORD dwICC;
} INITCOMMONCONTROLSEX, *LPINITCOMMONCONTROLSEX;

dans le winmain :

    INITCOMMONCONTROLSEX InitCtrls;
    InitCtrls.dwICC = ICC_LISTVIEW_CLASSES;
    InitCtrls.dwSize = sizeof(INITCOMMONCONTROLSEX);
    InitCommonControlsEx(&InitCtrls);

j'ai vu sur les forums : que pour definir INITCOMMONCONTROLSEX, il fallait definir la structure ainsi que les 2 #define...

mais j'obtient
InitCommonControlsEx undeclared...

j'ai linker la libcomctl32.a ... j'utilise DevCpp ou Code::Blocks
merci

1 réponse

racpp Messages postés 1909 Date d'inscription vendredi 18 juin 2004 Statut Modérateur Dernière intervention 14 novembre 2014 17
23 mai 2007 à 00:06
Salut;
Tu peux éviter tout cela en chargeant la DLL comctl32.dll au début de ton code:
HINSTANCE hDLL= LoadLibrary("comctl32.dll");

Et la libérer à la fin:
FreeLibrary(hDLL);
3
Rejoignez-nous