SetParent() child transparency
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: SetParent() child transparency

  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
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,026

    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 Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center