Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / September 2006

Tip: Looking for answers? Try searching our database.

more than one bitmap in resources in BITMAP section

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick Ruzand - 26 Sep 2006 07:53 GMT
Hello,

I have a simple question: can I have more than one bitmap resource in the
BITMAPS_BEGIN/BITMAPS_END section of a ctc ?

that is something like that:
BITMAPS_BEGIN
   guidMyPkg:IDB_MENU_IMAGES,    bmpPic1, bmpPic2, bmpPicSmile, bmpPicX,
bmpPicArrows;
   guidMyPkg:IDB_MYIMAGES, myBitmap;
BITMAPS_END

Because I tried such a configuration and it does not seem to work as
expected. Indeed, while the bitmap "IDB_MYIMAGES" is added to the resx file
with the correct id, the button that should be associated with the first
bitmap of IDB_MYIMAGES (via "myBitmap") displays the first bitmap of
IDB_MENU_IMAGES. (As a workaround, I added my new bitmap to the default
bitmap strip and it works).
So I am wondering if multiple bitmap resources is supported within the
BITMAPS section of a ctc file.

Thanks,

Patrick
Gary Chang[MSFT] - 27 Sep 2006 06:41 GMT
Hi Patrick,

I consulted this problem with our product team, they confirmed it is
possible to have more than one bitmap, but the bitmaps must have unique
GUIDs (and, unfortunately, the compiler doesn't warn when a GUID is
re-used).

It looks like you're re-using the package GUID for each of your bitmap
strips. You should generate a new GUID for each of these bitmap strips.

The GUID for a bitmap is what identifies the strip unlike all other items
which are identified by GUID:ID pair.   The ID here indicates where to get
the data later when it needs it from the resources of the dll where the
command table binary is stored.  When you reference it in a button it is
also not a GUID:ID pair but the strip GUID and the slot number in that
strip.   For this reason and to avoid symbolic name collision we recommend
that every strip be given a unique GUID that is not associated with
anything else.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Patrick Ruzand - 28 Sep 2006 07:14 GMT
Hi Gary,

> Hi Patrick,
>
[quoted text clipped - 5 lines]
> It looks like you're re-using the package GUID for each of your bitmap
> strips. You should generate a new GUID for each of these bitmap strips.
[...]

Thanks, it's cristal clear :-)

Patrick

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.