Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

Each button in the caption area of the resizable control bar is an instance of a CExtBarNcAreaButton-derived class. For example, the X button (Close) is an instance of the CExtBarNcAreaButtonClose class and to handle the event that is generated by clicking on this button, you need to create a CExtBarNcAreaButtonClose-derived class and implement the OnNcAreaClicked() virtual method in it. The code for the CExtBarNcAreaButtonClose::OnNcAreaClicked() method (the ExtControlBar.cpp file) should give you insight into how it can be done. To initialize the caption buttons, create a class derived from CExtControlBar and override the OnNcAreaButtonsReinitialize virtual method. In this method your CExtBarNcAreaButton-derived buttons should be used instead of original ones.