Pelles C forum

Pelles C => Bug reports => Topic started by: Robert on October 10, 2005, 04:49:14 AM

Title: Indent Add-in
Post by: Robert on October 10, 2005, 04:49:14 AM
Holger Buick's Indent Addin is not adding a command button to the Toolbar.

Robert Wishlaw
Title: Indent AddIn
Post by: Robert on October 10, 2005, 05:03:27 AM
The original DLL distributed in the indent1.0.1.zip does work.

A new DLL compiled from the .ppj with Pelle's C 4.0 does not work.

Robert Wishlaw
Title: Indent Add-in
Post by: TimoVJL on October 10, 2005, 06:11:47 PM
Add-In API have changed little.
Add that AddCmd.idMenu


AddCmd.id = ID_INDENT;
AddCmd.idMenu = AIM_MENU_NOTHING; // Toolbar button
return AddIn_AddCommand(hwnd, &AddCmd);
Title: Indent Add-in
Post by: Pelle on October 10, 2005, 08:37:05 PM
The best generic solution is probably to clear all structures before they are used:

for example, change:
ADDIN_ADD_COMMAND AddCmd;
to:
ADDIN_ADD_COMMAND AddCmd = {0};

Zero or NULL are the default for fields added after the initial release...

Pelle