If you implement IAcPiCategorizeProperties, you can also display category-specific command buttons in the Property Inspector grid. These buttons are similar to the Properties palette's general command buttons. One difference is location. Properties palette command buttons appear between the Property Inspector grid and the status bar. Category command buttons appear in the same row as a category name.
Creating category command buttons requires two basic steps:
Alternatively, category command buttons may be implemented by declaring a category command button map. The IAcPiCategorizePropertiesImpl template class looks for this map and, if found, uses its data to generate your buttons at runtime.
The first button property you specify in a category command button map is the category's PROPCAT identifier. This is the same ID you use to specify the category in your OPMPROP map. The remaining button properties are identical to those described in the Adding Command Buttons to the Properties Palette section.
Category command buttons and Properties palette command buttons also differ in size and resolution. A category command button's size is 13 pixels wide by 12 pixels tall. If your bitmap's resolution is larger than the button, only the upper-left 13° 12-pixel matrix displays.
A typical category command button map appears as follows:
BEGIN_CATCMDBTN_MAP() CATCMDBTN_MAP_ENTRY(PROPCAT_Data, 0, “IDB_CATCMDBTN1ENABLED”, PICTYPE_BITMAP, NULL, PICTYPE_UNINITIALIZED, 0x00000002, MyCatButtonProc) END_CATCMDBTN_MAP()
This map creates one toggle button, with a 13° 12 enabled bitmap and no disabled bitmap, and an execution procedure named MyCatButtonProc. This button appears in the Property Inspector's Data category row.