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 » CExtTreeGridWnd Collapse All
Subject Author Date
Surzhe Georgiy Sep 22, 2007 - 11:26 AM

How I can liten for button click(double click) event?
If I must use Message maps then what the message I can use?

Technical Support Sep 22, 2007 - 12:39 PM

Typically you don’t need to catch the button click event because most of grid cell classes themselves handle button clicks for activating popup controls like a list box or a date picker or displaying popup dialogs like a color picker dialog. But, of course, you can handle button clicks. You can do this by overriding a certain method in a new class. All grid cell classes are derived from CExtGridCell, which has some virtual methods like CExtGridCell::OnButtonPressing() and CExtGridCell::OnButtonPressed() for notifications about button up/down, dropdown or ellipsis button clicks. So, you can simply override CExtGridCell::OnButtonPressed() in your grid cell class.

It’s also possible to handle clicks on the grid cell button in your CExtTreeGridWnd-derived class (or CExtReportGridWnd-derived, or CExtGridWnd-derived) by overriding the CExtGridWnd::OnGridCellButtonPressed() virtual method. That is at the whole grid level. This virtual method should invoke some code which handles button clicks and return true to notify the grid cell that the button click has been handled and the cell should not invoke its default handler actions.

Suhai Gyorgy Sep 24, 2007 - 2:18 AM

If you need to handle mouse click anywhere on the grid (not only on a cell button), you can also override CExtGridBaseWnd::OnGbwAnalyzeCellMouseClickEvent