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 » Grid and other troubles Collapse All
Subject Author Date
Gavin Weeks Jan 19, 2010 - 2:22 PM

Not sure if the approach I am taking is right or not I derived a class from CExtGridWnd and I am trying to make certain cells read-only, as well as do other things with cell and text etc. the only thing that seems to be working is TextSet? what am I doing wrong?

CExtGridCell *pCell = this->GridCellGet(MASTER_COL,newRow,0,0,RUNTIME_CLASS( CExtGridCellStringDM ));








Also I have been converting the rest of the application over to prof-uis, dialogs are derived from

CExtResizableDialog and I have been using

SetAutoSubclassChildControls(); and converting over everything else when needed, however the title bar of my dialogs does not take on the current theme? any ideas?


Technical Support Jan 20, 2010 - 1:31 PM

The CExtGridCell::__ECS_READ_ONLY enumeration value is provided by the CExtGridCell::e_cell_state_t enumeration type specifying the text/background color types for methods like CExtGridCell::TextColorSet() and CExtGridCell::BackColorSet().
The CExtGridCell::ModifyStyle() method uses __EGCS_*** preprocessor constants - not enumeration values. And the CExtGridCell::ModifyStyleEx() method uses __EGCS_EX_*** preprocessor constants.
You can apply the __EGCS_READ_ONLY flag with the CExtGridCell::ModifyStyle() method to make any grid cell read only. The read only cells allow the in-place editor activation, but its activated in the read only mode. I.e. you can select text range and copy it to clipboard, but you cannot edit cell’s text. You can apply the __EGCS_NO_INPLACE_CONTROL flag to disable the in-place editor activation.
The CExtResizableDialog class implements an extended version of MFC dialog. It provides themed background, gripper control at the right bottom corner (if dialog is defined in resources as resizable) and child control anchoring. It does not provide the skinned window non-client area. The CExtNCW template decorator class does this. I.e. you should use the CExtNCW < CExtResizableDialog > class as base of your dialog class. Please do not use this template type for invoking the parent class methods or simply use the __super keyword (available with Visual Studio .NET or later).