Explorer Menu Icons

Add-in Express™ Support Service
That's what is more important than anything else

Explorer Menu Icons
Change Icons at Runtime 
Steven Johnson




Posts: 7
Joined: 2004-08-24
I'm using the following code to change the icon of a explorer menu item.

procedure TAddInModule.SysExplorerBarControls4Click(Sender: TObject);
begin
with TadxCommandBarButton(Sender) do begin
if SysDefaults.SecurityDisabled then begin
Glyph.LoadFromResourceName(HInstance,'LOCKOFF');
Caption := 'Warning Off';
end else begin
Glyph.LoadFromResourceName(HInstance,'LOCKON');
Caption := 'Warning On';
end; {if}
end; {with}
end;

The caption changes but the glyph does not. There is no error either. I verified that the bitmaps stored in the resource file are different.
Posted 20 Jul, 2005 12:08:45 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Steven,

See Add-in Express HOWTOs #15:
http://www.add-in-express.com/support/addin-delphi.php
Posted 21 Jul, 2005 07:14:48 Top