CPToggleButton
Class Name Derived From Styles Signals
CPDropDownButton PegBitmapButton BF_REPEAT
BF_DOWNACTION
BF_SELECTED
AF_ENABLED
PSF_SIZED
PSF_FOCUS_RECEIVED
PSF_FOCUS_LOST
PSF_KEY_RECEIVED
PSF_CLICKED
CPToggleButton implements a two state PegBitmapButton that can be selected or
unselected. When selected, the PegBitmap is inversed. Here is the code to create a
simple example:
void MCSWindow::AddUI()
{
PegRect r = GetToolbarButtonRect();
CPToggleButton *button = new CPToggleButton(r, &gbcontentBitmap);
m_ui->AddToolbarButton(button);
}
The first image below is when the button has not been clicked. The second is after a
click and the image has been inverted.
70