I just wrote a C3PO with Dephi 2010. Extending the Tools Menu for my function was easy, but I'm still trying to add a toolbar button.

Here is a snip from the code:

function CommandFactory.CustomizeToolBar(const Context: WideString;
GWToolbar: OleVariant): WordBool;

Button: variant;
ToolbarItems: variant;
Cmd: Command;
ToolbarItems := GWToolbar.ToolbarItems; // get toolbar items
// MessageBox(0, pwidechar(getCurrentDir) , 'EMAStart', MB_SETFOREGROUND);
If Pos(widestring('GW.CLIENT'), Context) <> 0 then // see if the context is GW.CLIENT or any sub class
GwCmdEMAStart := Command.CreateWithID(EMAStart); // create command for toolbar
Button := GWToolbar.ToolbarItems.Add('Start EMA', GwCmdEMAStart as IGWCommand); // add new Button
GwCmdEMAStart.ToolTp := 'Start EMA tooltip'; // set tooltip for toolbar item
Button.SetBitmap(GetCurrentDir+'\EMAStart.dll','IC ON1'); // set toolbar bitmap
// Button.SetBitmap(GetCurrentDir+'\icons.dll','BUTTO N_1'); // set toolbar bitmap
//C3PO WIZARD icons.dll can be replaced with the full path name of any .exe or .dll that have both 16x16 and 32x32 pixel bitmap
// BUTTON_1 can be replaced with the name of the bitmap contained in the .exe or .dll


result := FALSE;

I included the icon in 16x16, 24x24,32x32 and 48x48 sizes in the ressources..
When I change to the icons.dll (currently commented out) the button appears in the toolbar.
But I never managed to get my button to display.

What's wrong ?

Thanks a lot