|
|
|
|
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.
Subject |
Author |
Date |
|
ArgUser User
|
Dec 4, 2007 - 2:24 AM
|
I have created a simple CExtGridCellRadioButton overriden class (below) but the ’OnButtonPressed’ member is NOT being called. Yes, I have the IMPLEMENT_DYNCREATE(RadioButty, CExtGridCellRadioButton ) defined above any IFDEF DEBUG macros Also, I am putting this into a CExtTreeGridWnd derived grid.
???why is OnButtonPressed() not being called???
--------------
class CRadioButty: public CExtGridCellRadioButton {
DECLARE_DYNCREATE( RadioButty );
IMPLEMENT_ExtGridCell_Clone( RadioButty, CExtGridCellRadioButton );
RadioButty(CExtGridDataProvider * pDP = NULL): CExtGridCellRadioButton(pDP) {}
~RadioButty(void){}
virtual void
OnButtonPressed(CExtGridWnd & wndGrid,
INT nButtonType,
const RECT & rcCellExtra,
const RECT & rcCell,
LONG nVisibleColNo,
LONG nVisibleRowNo,
LONG nColNo,
LONG nRowNo,
INT nColType,
INT nRowType) { // note this override is NOT called!!!!!!!!!!!!!!!! CString msg;
msg.Format(_T("Pressed at col = [%d] row = [%d]"), nColNo, nRowNo);
AfxMessageBox(msg);
}
virtual bool OnQueryButtonInfo( INT nButtonType, bool * p_bEnabled, bool * p_bPressed = NULL, bool * p_bStayPressed = NULL, UINT * p_nTimerElapseValue = NULL ) const { // note this override is NOT called!!!!!!!!!!!!!!!! return false; } -------------------------------------
|
|
Technical Support
|
Dec 4, 2007 - 6:56 AM
|
CExtGridCell*** cells support three built-in buttons that can be displayed in the right part of the cell:
- an up-down button
- a drop-down button
- an ellipsis button
So any combination of these buttons can be displayed or hidden. The CExtGridCell::OnButtonPressed() virtual method is invoked to notify that the button is pressed. Please note the built-in buttons are not supported in CExtGridCellRadioButton . If you want to catch the event of changing the check mark state in a CExtGridCellRadioButton grid cell, you should override the CExtGridCell::ModifyStyle() virtual method and determine if the __EGCS_CHECKED is added or removed.
|
|