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 Tech Support » Border around CExtGridWnd Collapse All
Subject Author Date
Suhai Gyorgy Dec 6, 2007 - 7:32 AM

Dear Support,

On one of our dialogs ( CDialog, not ProfUIS themed dialog ) we have a CExtGridWnd control. Earlier it was CListCtrl with LVS_REPORT style. On this same dialog we also have some CEdit controls. What we’d like to achieve is to have both the grid and the editboxes have the same border, both in XP theme and in Classic theme. (When editbox have thin blue border - in XP theme -, so should the grid, when editbox have black 3D border - in Classic theme -, so should the grid.) This worked with CListCtrl, but not with CExtGridWnd. ( I know the reason, it is because in the different themes CEdit and CListCtrl is taken from different versions of ComCtl32.dll. But this knowledge won’t help me solve the problem. )

Could you please help us in this matter?
Thank you!

Technical Support Dec 7, 2007 - 11:19 AM

You didn’t see the grid because the container window had been created with a zero size. We coded a test project which implements what you are looking for. Take a look at the screenshots below. The first screenshot shows the grid with the XP theme and the second one with the Classic theme.



The container window which paints a theme dependent border is implemented in the CPMGridBorderWnd class.

We also added a CExtPaintManagerCustomT template to set the CExtPaintManagerNativeXP paint manager to the grid window
m_wndGrid.SetCustomPM( RUNTIME_CLASS( CExtPaintManagerNativeXP ) );

Suhai Gyorgy Dec 14, 2007 - 2:10 AM

Thank you, it works great!

Svetlozar Kostadinov Dec 6, 2007 - 5:28 PM

I am not sure if this would help you, but I am using CSimpleThinFrame class. It is defined in many of the Prof-UIS samples. You can wrap all of your own CWnd-derived objects by calling CSimpleThinFrame::CreateDynamicThinFrame( CWnd * pChildWnd )
I hope this helps.

Suhai Gyorgy Dec 7, 2007 - 4:54 AM

Thank you, I’ve tried that, but my grid just disappears when using it. In all Prof-UIS Samples this class is used in controlbars, not on a dialog. I’m guessing the problem is because a dialog can’t have more than one child with the same id (CSimpleThinFrame::Create creates a CWnd with the id of the control you attach it to). I’ve tried setting the id of this new "frame" window to be IDC_STATIC, but the grid is still invisible.

Have you used this class on a CDialog (not a CExtResizableDialog)?