|
-
May 20th, 1999, 01:35 PM
#1
MoveWindow
I use the following code (from a toolbar button) to move a child window using saved coordinates. I would like to automatically move the window (after it is created) without having to use a button.
Where in CPadView could I put this code???
or is there a better way???
CPadView in using CEditView as its base class.
CWinApp* pApp = AfxGetApp();
iWinHeight = pApp->GetProfileInt("DisplayWin", szWinHeight, 0);
iWinWidth = pApp->GetProfileInt("DisplayWin", szWinWidth, 0);
iWinTop = pApp->GetProfileInt("DisplayWin", szWinTop, 0);
iWinLeft = pApp->GetProfileInt("DisplayWin", szWinLeft, 0);
if (iWinHeight != 0) {
CFrameWnd* pFrame = GetParentFrame();
ASSERT_VALID(pFrame);
pFrame->MoveWindow(iWinLeft, iWinTop, iWinWidth, iWinHeight, TRUE);
}
-
May 20th, 1999, 02:12 PM
#2
Re: MoveWindow
Why don't u try the CView::InitialUpdate function !!!
It should work...
do let me know....
nms
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|