views:

34

answers:

2

Hello guys,

I have a main window created with :

if (!fullscreen)
{
    wStyle = WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_CLIPCHILDREN;
    wExStyle = WS_EX_TOPMOST;
}
else
{
    wStyle = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN;
    wExStyle = WS_EX_TOPMOST;
}

I have also a child window created runtime with :

wStyle = WS_VISIBLE | WS_POPUP | WS_CHILD;
wExStyle = WS_EX_TOPMOST;

Everything is going well when I am not in fullscreen. (i.e. The child window is well displayed on top of the parent window.)

But, when I am on fullscreen mode, the parent window is painted over the child window which cause an awful flickering.

How to set properties to the main and the child window in order to display well the child window, even in fullscreen mode ?

Thanks in advance for all your answers.

+2  A: 

Those style flag combinations are invalid. A child window cannot be a popup nor can it be top-most. No idea what kind of side effects that might have, never tried to get this wrong intentionally.

Getting stuck on this might be educational but not very practical. Have you considered using a class library to take care of the gooey stuff?

Hans Passant
Thank you for your answer.What library are you thinking about ?
Xavier V.
There are lots of them: Qt, MFC, wxWidgets, WTL, etcetera.
Hans Passant
Not sure why I got checkmarked, so +1 to even it out ;)
Billy ONeal
Thanks @Billy! +1 right back at ya.
Hans Passant
+2  A: 

WS_POPUP cannot be used with WS_CHILD. Not positive that's the cause though.

Billy ONeal
Is there a way to have a window without title bar, without status bar, without borders... and without using WS_POPUP ?
Xavier V.
@Xavier V.: Most windows don't have title bars, status bars, borders, etc. You need to ask for them if you want them. That's orthogonal to whether you want a child window or a popup window.
Adrian McCarthy