Link to home
Start Free TrialLog in
Avatar of zhpch
zhpch

asked on

How to make a CMDIChildWnd pop-up?

My application has one doc and two views. One view is used to display picture in normal size and the other view is used to display the same but zoomed picture. I hope the latter view can keep TOPMOST. But since the CMDIChildWnd cann't have a WS_POPUP style, how should I do? Thanks!
ASKER CERTIFIED SOLUTION
Avatar of piano_boxer
piano_boxer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mikeblas
mikeblas

Your override is incorrect.  You should code:

BOOL CTopFrame::PreCreateWindow(CREATESTRUCT& cs)
{
   if (!CMiniFrameWnd::PreCreateWinodw(cs))
      return FALSE;

   cs.dwExStyle |= WS_EX_TOPMOST;
   return TRUE;
}

.B ekiM

mikeblas: Hmmm. What I did works, but OK.

works != correct