Resizing a CFormView class
-
Hi everyone! I need to resize all the controls in a CFormView class on WM_SIZE message. I tried to resize each control seperately but it didn't worked. Also tried the code from OnInitialUpdate(): CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); but it does not resizes the controls... Any solutions of the problem? Thanks in advance! Gogou
-
Hi everyone! I need to resize all the controls in a CFormView class on WM_SIZE message. I tried to resize each control seperately but it didn't worked. Also tried the code from OnInitialUpdate(): CFormView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit(); but it does not resizes the controls... Any solutions of the problem? Thanks in advance! Gogou
Gogou wrote: I tried to resize each control seperately but it didn't worked. What happened ? the WM_SIZE callback is the place to do it, maybe you get the wrong RECT ? in the handler, you get the client rect ( GetClientRect ), this will give you the client rect of the formview, once that's done, you MoveWindow each of the controls you want to move. Max.