Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Custom Plugin to CodeGear C++Builder 2007



Permlink Replies: 2 - Last Post: Dec 25, 2016 12:11 AM Last Post By: Victor Rodniansky
Victor Rodniansky

Posts: 4
Registered: 11/30/16
Custom Plugin to CodeGear C++Builder 2007
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 20, 2016 12:09 AM
Hello ,

We need to wrivte a plugin to CodeGear™ C++Builder® 2007 IDE.
Back in C++ Builder 3 we could access the IDE menu like this:
TIMainMenuIntf *MainMenu = ToolServices->GetMainMenu();

Maybe you could provide me with some examples of how it should be done in C++ Builder 2007?

Thank you,
Victor

Alex Belo

Posts: 626
Registered: 10/8/06
Re: Custom Plugin to CodeGear C++Builder 2007
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 20, 2016 7:08 AM   in response to: Victor Rodniansky in response to: Victor Rodniansky
Victor Rodniansky wrote:

We need to wrivte a plugin to CodeGear™ C++Builder® 2007 IDE.
Back in C++ Builder 3 we could access the IDE menu like this:
TIMainMenuIntf *MainMenu = ToolServices->GetMainMenu();

Maybe you could provide me with some examples of how it should be
done in C++ Builder 2007?

From my expert:

procedure TArrayInspectorExpert.AddMenuItem;
var
MainMenu: TMainMenu;
ToolsMenu: TMenuItem;
begin
MainMenu:=(BorlandIDEServices as INTAServices).MainMenu;
Assert(Assigned(MainMenu), 'MainMenu component not found');
ToolsMenu:=MainMenu.Items.Find('Tools');
Assert(Assigned(ToolsMenu), '"Tools" component not found');
FMenuItem:=Menus.NewItem('Array Inspector', 0, False, True,
MenuItemClick, 0, 'ArrayInspectorMenuItem');
ToolsMenu.InsertComponent(FMenuItem);
ToolsMenu.Insert(0, FMenuItem);
end;

You can find many tips on IDE programming on Eric's Berry site (home of
GExperts)

Erik’s Open Tools API FAQ
http://www.gexperts.org/open-tools-api-faq/

--
Alex
Victor Rodniansky

Posts: 4
Registered: 11/30/16
Re: Custom Plugin to CodeGear C++Builder 2007
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 25, 2016 12:11 AM   in response to: Alex Belo in response to: Alex Belo
Alex Belo wrote:
Victor Rodniansky wrote:

We need to wrivte a plugin to CodeGear™ C++Builder® 2007 IDE.
Back in C++ Builder 3 we could access the IDE menu like this:
TIMainMenuIntf *MainMenu = ToolServices->GetMainMenu();

Maybe you could provide me with some examples of how it should be
done in C++ Builder 2007?

From my expert:

procedure TArrayInspectorExpert.AddMenuItem;
var
MainMenu: TMainMenu;
ToolsMenu: TMenuItem;
begin
MainMenu:=(BorlandIDEServices as INTAServices).MainMenu;
Assert(Assigned(MainMenu), 'MainMenu component not found');
ToolsMenu:=MainMenu.Items.Find('Tools');
Assert(Assigned(ToolsMenu), '"Tools" component not found');
FMenuItem:=Menus.NewItem('Array Inspector', 0, False, True,
MenuItemClick, 0, 'ArrayInspectorMenuItem');
ToolsMenu.InsertComponent(FMenuItem);
ToolsMenu.Insert(0, FMenuItem);
end;

You can find many tips on IDE programming on Eric's Berry site (home of
GExperts)

Erik’s Open Tools API FAQ
http://www.gexperts.org/open-tools-api-faq/

--
Alex

Thank you.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02