.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Toolbar SetBitmaps and Image Resource

5 REPLIES 5
Reply
Message 1 of 6
j_degner
716 Views, 5 Replies

Toolbar SetBitmaps and Image Resource

Is there a way to use an image resource as a toolbar button image? I'm struggling with getting a file path to use. I'd really like to store my images in my dll. I can get a uri, however still can't get the file path.

 

Any pointers? I feel like this should be easy and I'm missing something obvious 🙂

 

Thanks in advance for the help!

 

Jerri

5 REPLIES 5
Message 2 of 6
caddzone
in reply to: j_degner

No. Toolbar button images must be stored in image files or in a resource-only DLL.



AcadXTabs for AutoCAD
Supporting AutoCAD 2000-2011


Message 3 of 6
j_degner
in reply to: caddzone

If I store them in a resource only dll, how would I get the file path of the image resource in order to use it with the SetBitmaps method?

 

SmallBitmapName = "c:\images\16x16.bmp"    

LargeBitmapName = "c:\images\32x32.bmp"    
newToolBarButton.SetBitmaps(SmallBitmapName, LargeBitmapName)

Message 4 of 6
caddzone
in reply to: j_degner

You use the name of the resource in place of the filename.

 

I'm pretty sure all of this is covered in the customization docs.



AcadXTabs for AutoCAD
Supporting AutoCAD 2000-2011


Message 5 of 6
j_degner
in reply to: caddzone

Thanks for trying to help, however I'm not sure we're talking about the same thing or it's that I'm still not getting it. I'm attempting to use a .NET resource in my project as a bitmap for a toolbar button. My problem is that SetBitmaps only takes a string path to the image, which I'm unable to get for my image resource. Also, I don't know which customization docs you are referring to??

 

 

Message 6 of 6
caddzone
in reply to: j_degner

You cannot use a .NET resource to store toolbar bitmaps.

 

You can only use a resource-only DLL, which contains native Win32

resources, not .NET resources.



AcadXTabs for AutoCAD
Supporting AutoCAD 2000-2011


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost