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 » Handling close button CExtControlBar Collapse All
Subject Author Date
Luis Alberto Pereira Jun 29, 2004 - 10:31 AM

Dears,


Can you tell me how can I handle the event click of  close button in a CExtControlBar ?


 


Thanks,


Luis


 

Technical Support Jun 30, 2004 - 2:39 AM

Dear Luis,

The buttons in the caption area of the resizable control bar are not the button controls because the caption is a non-client area (which does not contain child windows). Each button is an instance of a CExtBarNcAreaButton-derived class. The X button ("Close") is the instance of the CExtBarNcAreaButtonClose class. To handle the mouse-click event, create your own class derived from CExtBarNcAreaButtonClose. Your button should implement the OnNcAreaClicked virtual method. Please take a look at the code for the CExtBarNcAreaButtonClose::OnNcAreaClicked method in ExtControlBar.cpp for details. Besides you should create a CExtControlBar-derived class and override the OnNcAreaButtonsReinitialize virtual method to initialize the caption buttons. This overridden method should be similar to the original one but with your CExtBarNcAreaButtonClose derived type for initializing the X button.