Guy, please, I'm desperate!!! I create a tab control in my application and, because I use the XP visual styles in my application, it gets the correct background color. However neither the dialog boxes I use for tabs, nor the controls on them have this background color (as it would be correct for a child window...). So the result is a very ugly tab control in which the tabs have the old gray color while the control itselfs has a white one. Could someone tell me some steps to make the background colors match? I'm using C, thank you!
Cry for Win32 help!!!!!!
Started by Mihail121, Apr 06 2006 04:22 PM
3 replies to this topic
#1
Posted 06 April 2006 - 04:22 PM
#2
Posted 06 April 2006 - 10:11 PM
How did you activate the use of the new comctrl32.dll? Did you embed a manifest?
#3
Posted 06 April 2006 - 11:52 PM
Hi Michail,
I think the code below is what you need!?
Talk to you
Thomas Rued
I think the code below is what you need!?
Talk to you
Thomas Rued
#define ETDT_DISABLE 0x00000001
#define ETDT_ENABLE 0x00000002
#define ETDT_USETABTEXTURE 0x00000004
#define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE)
typedef HRESULT STDAPICALLTYPE EnableThemeDialogTextureFn( HWND hwnd, DWORD dwFlags );
static HINSTANCE themeDllHandle = ::LoadLibrary( "UxTheme.dll" );
void setTabTextureAsDialogBg(HWND window)
{
if (themeDllHandle != 0)
{
EnableThemeDialogTextureFn* pEnableThemeDialogTexture = reinterpret_cast<EnableThemeDialogTextureFn*>(::GetProcAddress(themeDllHandle, "EnableThemeDialogTexture"));
if (pEnableThemeDialogTexture != NULL)
{
pEnableThemeDialogTexture(window, ETDT_ENABLETAB);
ShowWindow(window,SW_HIDE);
ShowWindow(window,SW_SHOW);
}
}
}
#4
Posted 07 April 2006 - 10:46 AM
Thank you, Thomas, this is exactly what I needed :yes: You saved me! :w00t:
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












