News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Background on Tab control and XP Theme

Started by caraveiro, August 01, 2008, 01:46:36 PM

Previous topic - Next topic

caraveiro

Hi there!

I have a dialog with a tab control on it.
Tab pages are created from in-memory-dialogs: modeless.

When the tab control displays, the tabs are "white" and the background of the tab pages is the COLOR_BTNFACE color.

I fight to make the tab transparent but I got another problems, I hope somebody could help me:

1. Flickers: when changing tabs there is a flick I wanna avoid.
2. Group text transparent: No great issue, but dunno how to make it "regular".


    .elseif uMsg == WM_CTLCOLORSTATIC
        invoke SetBkMode,wParam,TRANSPARENT     ;Background transparent for static controls.
        invoke SetBkColor,wParam,0
        ;invoke SetTextColor,wParam,0E3DEDDh         ;TextColor
        invoke GetStockObject,NULL_BRUSH
        ret       
.elseif uMsg==WM_ERASEBKGND     ;ONLY way to make TAB transparent.
mov eax, 1
ret   

[attachment deleted by admin]
"knowledge is now free at last, everything should be free from now on, enjoy knowledge and life and work for everybody else"
+ORC
http://www.fravia.com

ragdog

hi

i can not open this archiv this is defect!


greets,

caraveiro

This one is zipped with legacy suppor!  :U

[attachment deleted by admin]
"knowledge is now free at last, everything should be free from now on, enjoy knowledge and life and work for everybody else"
+ORC
http://www.fravia.com

ragdog

i thinks this works only with gdi programming
DrawText .... and BitBlt

im not sure.

greets

caraveiro


Take a Look a the 3th Tab, every control within the tab Does NOT take the XP background color but the BUTTONFACE instead.

I think it's something to do with classes... but I can get the trick!.

:red

[attachment deleted by admin]
"knowledge is now free at last, everything should be free from now on, enjoy knowledge and life and work for everybody else"
+ORC
http://www.fravia.com

caraveiro

 :cheekygreen:  :cheekygreen:  :cheekygreen: Solved dude!!!  :cheekygreen:  :cheekygreen:  :cheekygreen:

http://msdn.microsoft.com/en-us/library/bb773320(VS.85).aspx

By adding in the Modeless initialization code:


    .if uMsg == WM_INITDIALOG
        Invoke EnableThemeDialogTexture,hWnd,6 ;ETDT_ENABLETAB


Now I face a new problem: the app. does NOT works on Win98SE/W2K due the uxtheme.dll  :(

Now it's time for me to sleep.  :boohoo:

"knowledge is now free at last, everything should be free from now on, enjoy knowledge and life and work for everybody else"
+ORC
http://www.fravia.com