You can use one command class to control all toolbar buttons:
new CAAMyHeader("CommandName1","CommandLibName", "MyCommandClass",(void *)pParameter1);
new CAAMyHeader("CommandName2","CommandLibName", "MyCommandClass",(void *)pParameter2);
...
The last parameter is used to determine in the command class, which toolbar button is pushed. The "MyCommandClass" constructor must have a parameter with type void*. And in the .cpp file insert CATCreateClassArg(MyCommandClass, void); instead of CATCreateClass. |