Ok..Tabbed dialogs...XP style

This is a discussion on Ok..Tabbed dialogs...XP style within the Windows Programming forums, part of the Platform Specific Boards category; Ok... I manage to create tabbed dialogs... But...when I use the XP style...the dialogs keep its background color (COLOR_BTNFACE) making ...

  1. #1
    Registered User Joelito's Avatar
    Join Date
    Mar 2005
    Location
    Tijuana, BC, México
    Posts
    307

    Ok..Tabbed dialogs...XP style

    Ok... I manage to create tabbed dialogs...

    But...when I use the XP style...the dialogs keep its background color (COLOR_BTNFACE) making the TAB XP styled control horrible...

    is there anyway to making the dialogs like transparents...or some alternative in XP style?
    * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
    * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    If you're using a DIALOGEX resource definition for your dialog resource then include the EXSTYLE option and set it to WS_EX_TRANSPARENT. Alternatively, just handle the WM_ERASEBKGND message for the dialog in question and return TRUE. Another possibility is to SetWindowLongPtr(GWL_EXSTYLE) the extended style to include the WS_EX_TRANSPARENT bit during the dialog's WM_INITDIALOG handler but this may require a call to SetWindowPos to effect the change.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User Joelito's Avatar
    Join Date
    Mar 2005
    Location
    Tijuana, BC, México
    Posts
    307
    using WM_ERASEBKGND was easy enough.... thanks Ken
    * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
    * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.

  4. #4
    Registered User Joelito's Avatar
    Join Date
    Mar 2005
    Location
    Tijuana, BC, México
    Posts
    307
    Hi, me again:

    My tab is working propertly, but seems that controls like STATIC and Radio buttons seems to keeps the COLOR_BTNFACE color in XP style.. but WM_CTLCOLORBTN doesn't work:
    Code:
    case WM_CTLCOLORBTN:
    		{
    			if (HWND(lParam) == GetDlgItem(hDlg, IDC_RADIO1))
    			{
    				SetBkColor((HDC)wParam,TRANSPARENT);
    				return HRESULT(GetStockObject(NULL_BRUSH));
    			}
    			return 1;
    		}
    Any ideas
    * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
    * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.

  5. #5
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    WM_CTLCOLORBTN is next to useless. For static controls and radio buttons, handle the parent's WM_CTLCOLORSTATIC message instead.

    If you're having to do this just to get winxp visual styles then perhaps you need to look again at your xp manifest, if you are using one to get winxp styles, that is.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  6. #6
    Registered User Joelito's Avatar
    Join Date
    Mar 2005
    Location
    Tijuana, BC, México
    Posts
    307
    I'll read up more, thanks
    * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
    * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. XP Style
    By MK4554 in forum Windows Programming
    Replies: 4
    Last Post: 06-29-2006, 03:16 PM
  2. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 06:05 PM
  3. Visual C++ .NET 2003 and XP Style
    By kuphryn in forum Windows Programming
    Replies: 1
    Last Post: 10-07-2003, 11:08 AM
  4. Windows XP visual themes and style changing
    By bennyandthejets in forum Windows Programming
    Replies: 15
    Last Post: 10-03-2003, 10:49 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21