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