Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » CFormView-derived adapted for anchoring Collapse All
Subject Author Date
Ivanov Mikhail Dec 12, 2003 - 6:09 AM

I have main frame, splitter in it and CFormView-derived view inside splitter
According to your answers in this forum, I’ve added adaptor template class and derived my view from CExtWA < CExtWS < CExtAFV < CFormView > > >
Everything’s great, anchoring works excellent, BUT:
in right-bottom corner of my FormView there’s a picture like in resizable bars, i dont want it
what should i do?
thanks in advance.

Sergiy Lavrynenko Dec 12, 2003 - 8:00 AM

Hi,

Do you mean the resizing gripper in the right-bottom corner? If yes, please invoke ShowSizeGrip(FALSE). This method is provided by CExtWS template class. If not, send me a screenshot.

Best regards, Sergiy.

Finn Arildsen Dec 10, 2004 - 3:56 PM

 


I have approximately the same context. 


However, my CFormView derivative is always maximized, and it is a tabbed MDI view.  I would like to the view to start so that the dialog is "grown" to fill the frame.  However, the controls start out the size of the dialog resource, and cannot be grown beyond that size. 


If I don’t remove the gripper, I can use it to shrink the dialog, which seems to work as I would have expected, so the anchoring doesn’t seem to be my problem.


Any suggestions


Thanks,


Finn Arildsen

Technical Support Dec 11, 2004 - 9:12 AM

Dear Finn,

It seems you need to handle the WM_SIZE message in your CFormView-derived class. The message handler should invoke CView::OnSize() instead of CFormView::OnSize().

Finn Arildsen Dec 11, 2004 - 2:12 PM

Hi again


Sorry, I should have mentioned that I already do have an OnSize handler that calls CView::OnSize(). 


The fact is that the MDI frame in its OnCreate calls ShowWindow (SW_MAXIMIZED).  This means that the window already at create is maximized.  The anchors therefore are attached to the maximized window when ArrangeLayout is called, so that the margins get calculated relative to the maximized window, not relative to the resource borders.  Is there a way I can get the margins calculated relative to the resource borders so that when the window gets maximized, the controls will grow to fill the maximized window


 

Technical Support Dec 13, 2004 - 9:15 AM

Try to handle the WM_INITDIALOG message of the form view, resize the view to restore its original size, add anchors and, finally, restore the form view’s size. Ot just send us a test project that is similar to what you need and we will help you resolve the issue.

Ivanov Mikhail Dec 12, 2003 - 11:44 AM

thanks a lot, it works :)
?????? ?? ???? ?????? ??????? - gripper
??????? :)