[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 871
  • Last Modified:

Why do my popup dialogs dissapear en a MFC OpenGL Dialog

Hey there,

I have the following problem. I created a class that is derived from a CDialog class. It contains functionality for an openGL window. It works pretty good, but when there are popup's they keep dissapearing to the background. Only pressing the [ALT] key brings them up. Htey are selected the whole time, but just not visible. So I've tried some things, and when I hide and show this window, the popups, that have been pushed to the background, come forward. (By popups I mean, modal dialog boxes, messageboxes, etc.) I think it might have something to do with the OnPaint function that should be overwritten. Cause you can't call the OnPaint function of the CDialog class, and I've tried...you shoulnd call this function indeed.

So, I still have my problem and I solved it for now by hiding and showint the window every second, but this is a bad thing of course, so I'd like to know if someone had this problem before and might want to help me out here.

Thank you in advance.

1 Solution

Try this

 Just before you launch the popup try this ...

 pYourDlg ->SetWindowPos ( CWnd::wndBottom,0,0,0,0, SWP_NOMOVE|SWP_NOSIZE );

 then after the popup is gone

 pYourDlg ->SetWindowPos ( CWnd::wndTopMost,0,0,0,0, SWP_NOMOVE|SWP_NOSIZE );
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now