Merci, mais j'ai trouvé une autre soluce.
Ce que tu proposes fonctionne pour les static mais pas pour les champ editables, ils vont se retrouver noirs.
En fait, le problème est dû au thème. Il suffit d'appliquer le texturing de type TAB sur la fenetre fille.
Voilà le code pour ceux que ça intéresse: (en espérant qu'il fonctionne aussi sous vista, j'ai pas pu encore tester)
Code :
- void EnableThemeDialogTexture(HWND hwndTabControl)
- {
- HINSTANCE hDll = LoadLibrary(L"uxtheme.dll" );
- if(hDll == NULL)
- {
- // the DLL won't be available on anything except Windows XP
- //_ASSERT(0);
- return;
- }
- ULONG (PASCAL *lpfnEnableTheme)(HWND, DWORD);
- (FARPROC& )lpfnEnableTheme = GetProcAddress(hDll, "EnableThemeDialogTexture" );
- if(lpfnEnableTheme == NULL)
- {
- _ASSERT(0);
- return;
- }
- // ETDT_ENABLETAB = 6
- lpfnEnableTheme(hwndTabControl, 6);
- FreeLibrary(hDll);
- }
- BOOL CChild::OnInitDialog()
- {
- CDialog::OnInitDialog();
- EnableThemeDialogTexture(GetSafeHwnd());
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION : les pages de propriétés OCX devraient retourner FALSE
- }
|
Message édité par AsTro le 07-03-2009 à 03:05:17