How to size and move a view when it is created
-
Hi, I want my MyView to appear at x,y = 1,20 and be 1280 pixels wide and 800 high when it initially appears. I believe this is the code to move and size it ...
CFrameWnd* pParentFrame = GetParentFrame(); ASSERT_VALID( pParentFrame ); pParentFrame->MoveWindow( 1, 20, 1280, 800 );
... but what method should I put this code in? If I put in MyView::OnDraw everytime the View needs to be re-drawn it moves and resizes. I just want it start and 1,20 initially. -
Hi, I want my MyView to appear at x,y = 1,20 and be 1280 pixels wide and 800 high when it initially appears. I believe this is the code to move and size it ...
CFrameWnd* pParentFrame = GetParentFrame(); ASSERT_VALID( pParentFrame ); pParentFrame->MoveWindow( 1, 20, 1280, 800 );
... but what method should I put this code in? If I put in MyView::OnDraw everytime the View needs to be re-drawn it moves and resizes. I just want it start and 1,20 initially.You can set the initial size/position in
PreCreateWindow()
. --Mike-- When 900 years old you reach, look as good you will not. Hmm. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm