Article View: adobe.indesign.sdk
Article #96RollOverIconButtonWidget Change Image ICON
From: rbueno
Date: Fri, 20 Mar 2009 14:46
Date: Fri, 20 Mar 2009 14:46
49 lines
1932 bytes
1932 bytes
Hi, I try to change a image from a icon in my panel, but i don't have sucess.
I study Snnipet and PictureIcon examples and do all that stuff.
1 ) Create a new boss class in HRID.h:
DECLARE_PMID(kClassIDSpace, kHRButtonIconWidgetBoss, kHRPrefix + 8 )
2 ) Put the class in HR.fr:
Class
{
kHRButtonIconWidgetBoss,
kRollOverIconButtonBoss,
{
}
},
3 ) I Create a new type resource in HR.fr:
/*
// Type definition from button image
* / type HRButtonIcon (kViewRsrcType) : RollOverIconButtonWidget (ClassID = kHRButtonIconWidgetBoss)
{
};
4 ) Create a new WidgetID in HRID.h.
DECLARE_PMID(kWidgetIDSpace, kHRDialogAboutIconWidgetID, kHRPrefix + 13)
5 ) Create a new ResourceID in HRID.h
#define kHRDialogAboutIconRsrcID 135
6 ) Put the image HRDialogAbout.ico in the same folder the HR.rc file.
7 ) Edit the HR.rc file and add this line
kHRDialogAboutIconRsrcID ICON "HRDialogAbout.ico"
8 ) Finnaly put the button in the panel:
HRButtonIcon
(
kHRDialogAboutIconWidgetID, // widget ID
kHRDialogAboutIconRsrcID,
kHRPluginID, // icon, plugin ID
kBindNone, // frame binding
Frame(4,139,36,171) // left, top, right, bottom
kTrue, // visible
kTrue, // enabled
kADBEIconSuiteButtonType,
),
obs: A image appear in my panel, but not the image from my folder :(
Someone can help me plz
Technical Details
Message-ID:
<59b85c1c.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f63e9,c755a16b988709f8,start X-Google-Attributes: gidf63e9,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: rbueno@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!news2.glorb.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.indesign.sdk Subject: RollOverIconButtonWidget Change Image ICON Message-ID: <59b85c1c.-1@webcrossing.la2eafNXanI> Date: Fri, 20 Mar 2009 07:46:11 -0700 Lines: 53 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit