"Edward Diener" <ed******@tropicsoft.com> wrote in
news:Oa**************@TK2MSFTNGP14.phx.gbl:
In the explanation to the ToolboxBitmapAttribute it is mentioned
that new bitmaps added to an assembly by Visual Studio .NET get
the name of the default namespace prepened to the name of the
bitmap, and that the default namespace is the assembly name. It
then mentions that one can change the default namespace through
a project property, but there is no project property to change
this in VC++ .NET projects. Is there a way to chaneg the default
namespace in VC++ .NET IDE projects ?
This behavior is only for VB and C#. When you select "embed" for
bitmap files in C# or VB, the build system automatically creates a
namespace.filename.bmp file for you and embeds that as a resource
in the final assembly. This is different for C++. The
documentation you were reading is incomplete. Can you point me to
the documentaiton you were referring to so that I can make sure
that gets fixed.
For C++, to embed a resource, you need to add the bitmap file to
your project then pass a /ASSEMBLYREFERNCE:filename.bmp to the
linker (this is a property on the linker section of the project
property pages). ToolboxBitmapAttribute("filename.bmp") would just
work then.
Thanks,
--
Tarek Madkour, Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers
no rights.