Old 15th November 2004, 17:50   #1
Joonas
Forum King
 
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
TabControl background color

Argh! This is driving me nuts...

I have one dialog that Winamp calls that only contains a tab control. When you click a tab it loads a dialog and puts it into that tab control. It refuses to be transparent however when I set transparent on the dialog, instead it's gray while the tab control is some whiteish...(trying this with Windows XP style on).

Anyone have any clue how to fix this?

/Joonas
Joonas is offline   Reply With Quote
Old 15th November 2004, 18:58   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
code:
typedef HRESULT (WINAPI * ENABLETHEMEDIALOGTEXTURE)(HWND, DWORD);

void DoWinXPStyle(/*int on, */HWND tab){
#define ETDT_DISABLE 0x01
#define ETDT_ENABLE 0x02
#define ETDT_ENABLETAB 0x06
#define ETDT_USETABTEXTURE 0x04.

{
ENABLETHEMEDIALOGTEXTURE pfnETDT;
HINSTANCE hDll;

if(NULL != (hDll = LoadLibrary(TEXT("uxtheme.dll"))))
{
if(NULL != (pfnETDT = (ENABLETHEMEDIALOGTEXTURE)GetProcAddress(hDll,
"EnableThemeDialogTexture"))){
pfnETDT(tab,(/*on?*/ETDT_ENABLETAB/*:ETDT_DISABLE*/));
}
FreeLibrary(hDll);
}
}
}

-daz
DrO is offline   Reply With Quote
Old 15th November 2004, 22:30   #3
Joonas
Forum King
 
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
Just adding the library uxtheme.lib and calling

EnableThemeDialogTexture(hwnd, ETDT_ENABLETAB);

seems easier?

But maynbe that's just lazy programmer talking again

/Joonas
Joonas is offline   Reply With Quote
Old 15th November 2004, 22:32   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
and the reason why not to is...

http://forums.winamp.com/showthread....82#post1518382

-daz
DrO is offline   Reply With Quote
Old 15th November 2004, 22:56   #5
Joonas
Forum King
 
Join Date: Mar 2004
Location: Sweden
Posts: 2,263
Ooooh

/Joonas
Joonas is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump