Main Frame Resizing Problem
-
All, I am working on a simple application, using the WTL. The only child of the main window is a subclassed CEdit control. I have handled the
WM_NCCALCSIZE
message in the CEdit control to lock its size to 80 characters by 24 characters. The problem that I need help with is that that main frame is always the "windows default" size. I would like the client area of the main frame to be the exact size of the child window. I tried to handleWM_NCCALCSIZE
in the main frame class, but alas, it is called beforeWM_NCCALCSIZE
andWM_CREATE
in the child window. The effect that I am trying to achieve is simliar to the appearance of the GVim program, if that is of any help. Thanks! -- Paul "I drank... WHAT?" -
All, I am working on a simple application, using the WTL. The only child of the main window is a subclassed CEdit control. I have handled the
WM_NCCALCSIZE
message in the CEdit control to lock its size to 80 characters by 24 characters. The problem that I need help with is that that main frame is always the "windows default" size. I would like the client area of the main frame to be the exact size of the child window. I tried to handleWM_NCCALCSIZE
in the main frame class, but alas, it is called beforeWM_NCCALCSIZE
andWM_CREATE
in the child window. The effect that I am trying to achieve is simliar to the appearance of the GVim program, if that is of any help. Thanks! -- Paul "I drank... WHAT?"Look at the implementation of
CScrollView::ResizeParentToFit
(at<VisualStudio>\vc\mfc\src\viewscrl.cpp
), maybe you can copy and paste that code to your project to achieve a similar effect. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo