Discussion:
Moving a CView from one CFrameWnd to another
(too old to reply)
Paavo Helde
2009-06-29 17:48:53 UTC
Permalink
What I'm stuck is when I want to move the view from one frame window to
another. I can remove the view from the old frame (which is using
CTabView), but having troubles with inserting it into an almost bare-bones
CFrameWnd. It seems that changing the view parent by CWnd::SetParent() is
not enough, the new frame is remaining blank. Is there something obvious
I'm missing?

TIA
Paavo
Paavo Helde
2009-06-30 18:26:38 UTC
Permalink
Post by Paavo Helde
What I'm stuck is when I want to move the view from one frame window
to another. I can remove the view from the old frame (which is using
CTabView), but having troubles with inserting it into an almost
bare-bones CFrameWnd. It seems that changing the view parent by
CWnd::SetParent() is not enough, the new frame is remaining blank. Is
there something obvious I'm missing?
Problem solved, it appears I needed to call also ShowWindow(SW_SHOW) and
EnableWindow() on the moved view. Not exactly sure why this is needed, the
view was not hidden or disabled meanwhile AFAICS.

Paavo

Loading...