CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2003
    Location
    Brazil
    Posts
    335

    Overlapped dialog that is not overlapped

    Hi !!

    I´m facing a problem that simple said is "the dialog is not overlaped, it keeps at topmost". I´ve checked all creation parameters in the resource wizard and it is in overlapped mode. I have also checked if I´m changing something on creation and found nothing out of the normal. also I changed the the paternity (with/without) and nothing changes, the parent windows get overlaped and the dialog keeps on top. Any hint how can this happen?

    Thank you

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Overlapped dialog that is not overlapped

    Did you try to use Spy++ to obtain all the window styles (as well a also extended styles) for this dialog?
    Just try and report us all these styles...
    Victor Nijegorodov

  3. #3
    Join Date
    Feb 2003
    Location
    Brazil
    Posts
    335

    Re: Overlapped dialog that is not overlapped

    No Victor,

    I´ll do that and report the results.

    Thank you for the replay.

  4. #4
    Join Date
    Feb 2003
    Location
    Brazil
    Posts
    335

    Re: Overlapped dialog that is not overlapped

    The styles are (14CF00C4) add WS_ at beginning:

    CAPTION
    VISIBLE
    CLIPSIBLINGS
    SYSMENU
    THICKFRAME
    OVERLAPPED
    MINIMIZEBOX
    MAXIMIZEBOX
    3DLOOK
    SETFONT
    MODALFRAME

    and the extended styles are (00010101) add EX_ at beginning:

    LEFT
    LTRREADING
    RIGHTSCROOLBAR
    DLGMODALFRAME
    WINDOWEDGE
    CONTROLPARENT

    Another important information is that the dialog is modless... (is this the reason?)

    thank you.

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Overlapped dialog that is not overlapped

    Quote Originally Posted by Rabelo View Post
    The styles are (14CF00C4) add WS_ at beginning:

    CAPTION
    VISIBLE
    CLIPSIBLINGS
    SYSMENU
    THICKFRAME
    OVERLAPPED
    MINIMIZEBOX
    MAXIMIZEBOX
    3DLOOK
    SETFONT
    MODALFRAME

    and the extended styles are (00010101) add EX_ at beginning:

    LEFT
    LTRREADING
    RIGHTSCROOLBAR
    DLGMODALFRAME
    WINDOWEDGE
    CONTROLPARENT

    Another important information is that the dialog is modless... (is this the reason?)

    thank you.
    Well, there is no WS_EX_TOPMOST style, so it should behave as a usual overlapped window.
    Could you explain what you don't like it this window behavior?

    You could also try to use WS_POPUP style rather than WS_OVERLAPPED one.
    Victor Nijegorodov

  6. #6
    Join Date
    Feb 2003
    Location
    Brazil
    Posts
    335

    Re: Overlapped dialog that is not overlapped

    I found that it is because the dialog is non modal. Non modal dialogs are allways visible.

    The explanation is:

    This dialog shoud appear only when a certain window is with the focus and it must appear at topmost (like a toolbar) but when this window is overlapped it shoud be overlapped too but the way it is it is remaining on top.

    Thank you

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

    Re: Overlapped dialog that is not overlapped

    Quote Originally Posted by Rabelo View Post
    Non modal dialogs are allways visible.
    Who said that? A dialog is a window and each window can be visible or not.
    To make a window visible call ShowWindow(SW_SHOW).
    To hide a window call ShowWindow(SW_HIDE).
    Last edited by ovidiucucu; February 20th, 2018 at 03:32 PM.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

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

    Re: Overlapped dialog that is not overlapped

    In order to understand each other when talking about "overlapped", "popup" and so on, please have a look at these FAQs:
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  9. #9
    Join Date
    Feb 2003
    Location
    Brazil
    Posts
    335

    Re: Overlapped dialog that is not overlapped

    I guess you are mading some confusion with hide window and overlapped window. ShowWindow with SW_HIDE simply hide the window but maintain it on its order. If it is the topmost window it will be hide but it still will be the topmost window. Modeless dialog box are created at topmost´of its parent window. Hide it don´t change it.

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