Professional UI Solutions
Site Map   /  Register


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 » CExtGridWnd in a CView Collapse All
Subject Author Date
Finn Arildsen Nov 29, 2006 - 1:00 PM

I want to show a grid in an MDI View window. How do I go about putting a grid in a CView derived class?

Thanks in advance,

Finn Arildsen

Technical Support Nov 30, 2006 - 12:39 PM

We would like to add the following. You could simply create an MDI project based on the document/view architecture, which has a child view class derived from the MFC’s CView class. In the view’s OnCreate() handler method, simply create one child grid window. In the view’s OnSize() handler method, stretch the child grid window to entire client area of the view window.

Suhai Gyorgy Nov 30, 2006 - 3:08 AM

You can use CFormView class with the following templates: CExtWS < CExtWA < CExtAFV < CFormView > > >
CExtAFV is a helper class to be able to use the other template classes. ("CExtAFV template adaptor for CFormView")
CExtWA is used to easily create and manage auto-resizable controls inside your view.
CExtWS is used to easily add the CExtPaintManager class to your view.

In the dialog resource you assign to the formview, you should just place a custom control that occupies the whole area of the view, with class name ProfUIS-ScrollItemWindow, style 0x50010000 and extended style 0x0. To this custom control you can assign a gridcontrol and in the initialization of the formview you can add anchor to this grid to constantly grow with the formview.

I haven’t tried it though, I hope there won’t be any problem with scrollbars.