Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BMP vs. ICO

8 REPLIES 8
Reply
Message 1 of 9
Anonymous
667 Views, 8 Replies

BMP vs. ICO

Can you use .ICO files (Icon Files) for the buttons in A2K4?

Thanks,
Andrew
8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: Anonymous

If you could, they would have done it.

--
Dean Saadallah
Add-on products for LT
http://www.pendean.com/lt
--
Message 3 of 9
Anonymous
in reply to: Anonymous

Dean Saadallah wrote:
> If you could, they would have done it.
>

They did 🙂

You can use icon files for your toolbar buttons (16 x 16 and 32 x 32, 32-bit
w/alpha). You need to edit your .mns/.mnu file manually instead of using the
built-in editor.

You can also use them compiled into a dll as RCDATA.

--
|
----+----------------------------------------------
| Byron Blattel
| CADwerx---Applications for AutoCAD
| Autodesk Registered Developer
| email: byron@cadwerx.net
| web site: http://www.cadwerx.net
| Custom Programming Services
Message 4 of 9
garysmith
in reply to: Anonymous

Blattel, Byron wrote:

You can use icon files for your toolbar buttons (16 x 16 and 32 x 32, 32-bit
w/alpha). You need to edit your .mns/.mnu file manually instead of using the
built-in editor.

You can also use them compiled into a dll as RCDATA.

--

I know this is a very old topic, but has anyone tried this? I want to create a pull-down menu in AutoCAD 2006/7 that will show icons next to the commands.

See my previous post http://discussion.autodesk.com/thread.jspa?messageID=5522908.

Trouble is the images *must* have a transparent background (like the AutoCAD ones) so that whatever colour my users have their menu background set to, the icon doesn't show a coloured box!

I've tried craeting .ICO files as they can contain a transparent background, but I can't get AutoCAD to display them. I've used ResHacker to compile them into a DLL but nothing..

Byron, are you out there? Can you tell me how it's done? I can't get onto your website at the moment..

Many thanks,
Gary
Message 5 of 9
garysmith
in reply to: Anonymous

Don't know if anyone else is interested in this thread, but I have now managed to get AutoCAD 2004-2007 to display ICO files in toolbars/pull-down menu's in place of the usual BMP files! (pre-2004 versions of AutoCAD won't do it).

You just need to convert all your BMP files to ICO, then change the [iconname].BMP references in your MNS file to [iconname].ICO

Still haven't worked out how to compile the ICO files into a DLL and get AutoCAD to display them though. So if *anyone* knows how to convert files into a DLL as RCDATA, pleeeaase give me a few pointers..

Many thanks,
Gary
Message 6 of 9
Anonymous
in reply to: Anonymous

Search here using "resource dll". No need to rename the bitmaps to .ico,
either. I'm not sure what you mean by RCDATA however.

The .dll needs to have the same name as the menu file.

--
R. Robert Bell


wrote in message news:5549695@discussion.autodesk.com...
Don't know if anyone else is interested in this thread, but I have now
managed to get AutoCAD 2004-2007 to display ICO files in toolbars/pull-down
menu's in place of the usual BMP files! (pre-2004 versions of AutoCAD won't
do it).

You just need to convert all your BMP files to ICO, then change the
[iconname].BMP references in your MNS file to [iconname].ICO

Still haven't worked out how to compile the ICO files into a DLL and get
AutoCAD to display them though. So if *anyone* knows how to convert files
into a DLL as RCDATA, pleeeaase give me a few pointers..

Many thanks,
Gary
Message 7 of 9
garysmith
in reply to: Anonymous

Thanks for the reply. Maybe I'm not explaining myself very well?

I have succesfully compiled BMP files into a DLL using the ResHacker software (found out how to do it by searching through these discussion forums).

However, I wanted to use ICO files as they can be made to include a transparent background - required so that you don't see the square grey background when displayed in the pull-down menu. I've managed to do this too (this is where converting the BMPs to ICOs and changing the BMP references to ICO in the MNS file comes in..)

The problem I've got now is that unlike BMP files, it seems the ICO files cannot be displayed in AutoCAD if they are stored in a DLL - ResHacker allows them to be added but AutoCAD doesn't display them.

I've looked at the default AutoCAD buttons DLL file and it seems the bitmaps/icons are stored as RCDATA - I wondered if this was the way forward - Byron Blattel replied to the original post in this thread and seemed to know what to do, but it seems he/she doesn't post here anymore? A Google search doesn't seem to turn out anything of much use either.

Hope you understand what I'm trying to achieve now? I'm nearly there - just gotta get these darn ICO files to display from a DLL..

Gary
Message 8 of 9
Anonymous
in reply to: Anonymous

Does this help?

http://discussion.autodesk.com/thread.jspa?messageID=3963477

or this?

http://discussion.autodesk.com/thread.jspa?messageID=4971518


--
R. Robert Bell


wrote in message news:5550068@discussion.autodesk.com...
Thanks for the reply. Maybe I'm not explaining myself very well?

I have succesfully compiled BMP files into a DLL using the ResHacker
software (found out how to do it by searching through these discussion
forums).

However, I wanted to use ICO files as they can be made to include a
transparent background - required so that you don't see the square grey
background when displayed in the pull-down menu. I've managed to do this
too (this is where converting the BMPs to ICOs and changing the BMP
references to ICO in the MNS file comes in..)

The problem I've got now is that unlike BMP files, it seems the ICO files
cannot be displayed in AutoCAD if they are stored in a DLL - ResHacker
allows them to be added but AutoCAD doesn't display them.

I've looked at the default AutoCAD buttons DLL file and it seems the
bitmaps/icons are stored as RCDATA - I wondered if this was the way
forward - Byron Blattel replied to the original post in this thread and
seemed to know what to do, but it seems he/she doesn't post here anymore? A
Google search doesn't seem to turn out anything of much use either.

Hope you understand what I'm trying to achieve now? I'm nearly there - just
gotta get these darn ICO files to display from a DLL..

Gary
Message 9 of 9
garysmith
in reply to: Anonymous

Thanks for the links - I've done quite a bit of searching through these forums and have come across the first thread.. but not the second (quite how I missed it I don't know!).

The specific grey (192, 192, 192) is interesting. It seems AutoCAD is told to recognise this colour and make it transparent, so although the BMP file itself does not support transparencies, the software does the job..?

I've tested this with AutoCAD 2007 and it seems to work! I'll have to test it on previous versions when I get back in the office, but it sure looks promising.

I might have found this out if I'd have been making my bitmaps with AutoCAD 2007, but I'm just converting my menu that was created with AutoCAD 2000 and getting it working properly with all the newer versions.

Many thanks for your help - sometimes it pays to re-think and try from a different angle.

Gary

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

Post to forums  

Autodesk Design & Make Report

”Boost