[win32] - how hide backcolor in a form?

This is a discussion on [win32] - how hide backcolor in a form? within the Windows Programming forums, part of the Platform Specific Boards category; i have these code for make the form transparent: Code: void settransparency(HWND handlewindow,color backcolor, std::uint8_t Transperancy=255) { long wAttr = ...

  1. #1
    Registered User
    Join Date
    Aug 2013
    Posts
    152

    [win32] - how hide backcolor in a form?

    i have these code for make the form transparent:
    Code:
     void settransparency(HWND handlewindow,color backcolor, std::uint8_t Transperancy=255)
            {
                long wAttr = GetWindowLong(handlewindow, GWL_EXSTYLE);
                if(backcolor==-1)
                {
                    SetWindowLong(handlewindow, GWL_EXSTYLE, wAttr | WS_EX_LAYERED);
                    SetLayeredWindowAttributes(handlewindow, NULL, Transperancy, 0x02);
                }
                else
                {
                    SetWindowLong(handlewindow, GWL_EXSTYLE, wAttr | WS_EX_LAYERED);
                    SetLayeredWindowAttributes(handlewindow, backcolor, Transperancy, 0x02 | 0X01);
                }
    
            }
    but have problems. don't only hide the backcolor but(with title bar) everything is disable
    what i mean: think the title bar is above the word text... if we click on title bar, why the word text wins the focus?
    these problem don't make sence to me... i just make the form transparent
    what can you advice me?

  2. #2
    Registered User
    Join Date
    Jul 2014
    Posts
    2


  3. #3
    Registered User
    Join Date
    Aug 2013
    Posts
    152
    Quote Originally Posted by Poline View Post

    sorry my question is confused?
    i need hide the backcolor and continue working with form. but where the backcolor is hide, i can click on form that is on back.
    is what i need

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Create "ghost" form from Win32 handle
    By Opariti in forum C# Programming
    Replies: 2
    Last Post: 02-23-2010, 12:50 PM
  2. Accessing Controls on a different form from one form.
    By Tperry23 in forum C# Programming
    Replies: 7
    Last Post: 06-09-2005, 06:13 PM
  3. Finding a knoppix demo in win32 form
    By Stan100 in forum Tech Board
    Replies: 3
    Last Post: 01-15-2005, 05:08 PM
  4. Backcolor-Qs
    By Dragon227Slayer in forum C# Programming
    Replies: 4
    Last Post: 12-09-2003, 08:22 AM
  5. long form of year to short form?
    By bc120 in forum C Programming
    Replies: 2
    Last Post: 12-31-2001, 04:34 PM

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