-get parent frame of your child view -call ActiveFrame() on method on parent frame CMDIFrameWnd *pFrame = (CMDIFrameWnd*)yourChildView->GetParentFrame(); pFrame->ActivateFrame(); hope it works for you, i did for me. F.Dost
F Dost
Posts
-
Child Windows -
Activating windowdoes anyone know how make a window active when multiple windows are open. in an mdi applicatin under window menu item there is a list of all open files and the active one is checked, i want to know how that code works, so that when i click on my tree node that window should be activated, Thanks, F.Dost
-
need help with drawing and scrollingthank you for your respond.... 1) i don't want cursor to go out of my window if it is pressed and is drawing cursor, 3) i can't change the coordiantes of my objects, caz i write them in the file and read them, user will be able to draw in say (500 by 500), but the view can be smaller of bigger, do you think i need to scale my view to (500 by 500)? Thanks, F.Dost
-
need help with drawing and scrollingin my application i draw rectangles, using points in LButtonDown, MouseMove and LButtonUp, 1) I don't want LButtonUp to happen outside of my view, How can i stop that? 2) My rectangles can be moved using arrow buttons, i want scrollers to appear if any point of my rects are outside of the display area(if the window is small) 3) when i scroll the window, my objects ARE redrawn but they don't move with the window. They stick to the same location. Do i need to do world to normalize to device? Need code for that.... If you can answer any of the above questions it will be highly appreciated :) thanks, F.Dost
-
Setting MDI child Window's SizeThanks for your help but, I did overwrite OnSize() setting cx and cy to what i want but it was ignored, i used it before and after the default call, i don't know what to do with WM_GETMINMAXINFO, i can't see it in classwizard, need more detail... Thanks F.Dost
-
Changing CButton Caption?Try this: GetDlgItem(IDC_YOUR_BUTTON_ID)->EnableWindow(FALSE); GetDlgItem(IDC_YOUR_BUTTON_ID)->SetWindowText("new text"); F.Dost
-
Scrolling MDI ChildHow can i make my child window scorll when contents are bigger than window size? What functions do i need to overwrite? Thanks, F.Dost
-
Setting MDI child Window's Sizecould anyone tell me how to set min/max size of an child view in MDI Applications? Thanks F.Dost
-
MDI Child's Sizedoes anyone know how to set max/min size of an mdi child view? i have a mdi application, and i want my my views to have a specific width and height...any idea? thanks F.Dost