THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/02/2003 at 11:15, xxxxxxxx wrote:
Let's try this again with IE crashing!!!! :(
Here's how to add an Icon to the Plugin's menu item:
Bool PluginStart()
{
WhateverData* whateverdata = NULL;
// initialize global resource object
if (!resource.Init()) return FALSE;
// create new instance of WhateverData class
if ((whateverdata = gNew WhateverData) == NULL)
{
GePrint(GeLoadString(IDS_PLUGIN_NAME) + ": "+GeLoadString(IDS_ERR_CONSTR));
return FALSE;
}
// register hook, ADD MENU ICON, and return
return (RegisterCommandPlugin(PLUGIN_ID, GeLoadString(IDS_PLUGIN_NAME), 0, "pluginicon.tif", GeLoadString(IDS_PLUGIN_DESCR), whateverdata));
}
And here's how to add Icons to your dialogs:
Bool ErrorDialog::CreateLayout()
{
BitmapButtonCustomGui* erroricon;
SetTitle(GeLoadString(ERROR_DIALOG_TITLE));
GroupBegin(5000, BFH_CENTER, 2, 2, NULL, 0);
{
// some room for the icon
GroupBorderSpace( 8, 8, 8, 8 );
{
BaseContainer settings;
settings.SetBool(BITMAPBUTTON_BUTTON,TRUE);
erroricon = (BitmapButtonCustomGui* )AddCustomGui(4000,CUSTOMGUI_BITMAPBUTTON,String(),BFH_FIT,0,0,settings);
}
if (erroricon) erroricon->SetImage(GeGetPluginPath() + Filename("res") + Filename("erroricon.tif"));
...
GroupEnd();
}
HTH,
Robert