Thread: making transparent backgrounds... FOR REAL!

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

    Question making transparent backgrounds... FOR REAL!

    Check mi image:
    http://img209.imageshack.us/img209/5...titled1xo6.jpg
    This is the code:
    Code:
    IDD_DIALOG2 DIALOGEX 0, 0, 180, 134
    STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
    EXSTYLE WS_EX_TRANSPARENT
    FONT 8, "MS Shell Dlg", 400, 0, 0x1
    BEGIN
        CONTROL         "",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | 
                        UDS_ARROWKEYS,39,24,11,14,WS_EX_TRANSPARENT
        GROUPBOX        "Commands:",IDC_STATIC,62,14,98,52,0,WS_EX_TRANSPARENT
        GROUPBOX        "Playlist:",IDC_STATIC,7,14,50,31,BS_LEFT
    END
    and also for the DlgProc:
    Code:
    INT_PTR CALLBACK ChildsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
    switch(uMsg) {
    //...
    case WM_ERASEBKGND:
    		{
    			return 1;
    		}
    //...
    But still, those Groupboxes still have those ugly backgrounds...
    any ideas about how to make them real transparent?

    I hope to use the WM_CTRLCOLORSTATIC as last awnser.
    * 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
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    >> But still, those Groupboxes still have those ugly backgrounds...

    So do the buttons.

    Actually I do have an idea. How about making a custom callback for your groupboxs, and giving them the style WS_EX_LAYERED and use SetLayeredWindowAttributes() to make the defualt background transparent?
    Last edited by Queatrix; 09-14-2006 at 09:21 AM.

  3. #3
    Registered User Joelito's Avatar
    Join Date
    Mar 2005
    Location
    Tijuana, BC, México
    Posts
    310
    Ok...I'll try that
    * 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. Transparent, Editbox, HOLLOW_BRUSH, Marking text?
    By Dampy in forum Windows Programming
    Replies: 6
    Last Post: 09-22-2008, 07:17 PM
  2. Transparent panels overlapped
    By AtomRiot in forum C# Programming
    Replies: 3
    Last Post: 04-21-2007, 09:16 PM
  3. Making great graphics
    By MadCow257 in forum Game Programming
    Replies: 1
    Last Post: 02-20-2006, 11:59 PM
  4. OSD or transparent window
    By Mox in forum Windows Programming
    Replies: 5
    Last Post: 01-28-2003, 06:31 PM
  5. About Unix Programming - Making a career desision
    By null in forum C Programming
    Replies: 0
    Last Post: 10-14-2001, 07:37 AM