CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2012
    Posts
    1

    SetParent() child transparency

    Hello, first of all I'm codding in C# + WPF but I think this problem is mostly related to WinAPI and this is the only section in forum where I think it supposed to be.
    So my problem:
    I got transparent WPF window and want to SetParent() to another window. Everything works as I want except that child loses its transparency (and top part of winexplorer window appears a bit strange, buttons and textbox dissapears when under my children).
    Here is the preview of my problem:

    All I need is to make child transparent. Do I need to set some flag for parent or child or something else?
    Thanks in advance!

  2. #2
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    Re: SetParent() child transparency

    Transparent windows are layered (i.e. have WS_EX_LAYERED style set).
    Top-level windows can be layered, the child ones cannot.

    See more about layered windows in MSDN.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured