Visual LISP, AutoLISP and General Customization

Reply
*Schmidt, Andrew W.
Message 1 of 9 (178 Views)

BMP vs. ICO

178 Views, 8 Replies
10-09-2003 12:44 AM
Can you use .ICO files (Icon Files) for the buttons in A2K4?

Thanks,
Andrew
*Saadallah, Dean
Message 2 of 9 (178 Views)

Re: BMP vs. ICO

10-10-2003 09:28 PM in reply to: *Schmidt, Andrew W.
If you could, they would have done it.

--
Dean Saadallah
Add-on products for LT
http://www.pendean.com/lt
--
*Blattel, Byron
Message 3 of 9 (178 Views)

Re:

10-11-2003 01:09 AM in reply to: *Schmidt, Andrew W.
Dean Saadallah wrote:
> If you could, they would have done it.
>

They did :smileyhappy:

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
Distinguished Contributor
Posts: 136
Registered: ‎12-03-2003
Message 4 of 9 (178 Views)

Re:

04-04-2007 05:56 AM in reply to: *Schmidt, Andrew W.
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
Distinguished Contributor
Posts: 136
Registered: ‎12-03-2003
Message 5 of 9 (178 Views)

Re:

04-12-2007 06:24 AM in reply to: *Schmidt, Andrew W.
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
*R. Robert Bell
Message 6 of 9 (178 Views)

Re: Re:

04-12-2007 07:45 AM in reply to: *Schmidt, Andrew W.
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
Distinguished Contributor
Posts: 136
Registered: ‎12-03-2003
Message 7 of 9 (178 Views)

Re: Re:

04-12-2007 10:10 AM in reply to: *Schmidt, Andrew W.
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
*R. Robert Bell
Message 8 of 9 (178 Views)

Re: Re:

04-12-2007 10:18 AM in reply to: *Schmidt, Andrew W.
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
Distinguished Contributor
Posts: 136
Registered: ‎12-03-2003
Message 9 of 9 (178 Views)

Re: Re:

04-12-2007 11:57 AM in reply to: *Schmidt, Andrew W.
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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community