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 » Grid control in dialogs Collapse All
Subject Author Date
Kevin McGarigal Feb 9, 2005 - 9:33 PM

What is the proper way to insert a CExtGridWnd as a custom control in a dialog since there is no corresponding MFC control to replace as recommended in the FAQ?

Technical Support Feb 10, 2005 - 5:57 AM

Here are the steps which will allow you to get what you need:

1. Add a custom control to your dialog resource and use the string "ProfUIS-ScrollItemWindow" as its window class, IDC_MY_GRID as its control identifier, the value 0x50010000 as its window style, and the 0x20000 value as its extended style. You can specify your own values for the window styles.

Add the CExtGridWnd m_wndGrid member variable to your dialog and the DDX_Control(pDX, IDC_MY_GRID, m_wndGrid) line to the method body of DoDataExchange().

3. Initialize the grid control in the OnInitDialog() method.