The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: Gunner on March 06, 2010, 03:44:37 AM

Title: Where are these images stored?
Post by: Gunner on March 06, 2010, 03:44:37 AM
What system file are these images in?  Instead of saving the "on" and "off" in my rc, I would like to load them at run time from whatever file they are in on the machine if possible

(http://gunner.001webs.com/radio.jpg)
Title: Re: Where are these images stored?
Post by: donkey on March 06, 2010, 05:08:08 AM
Hi Gunner,

You're not really likely to find those images anywhere in a Microsoft system library, they are generated by Windows as needed using the DrawFrameControl function (http://msdn.microsoft.com/en-us/library/aa930489.aspx)
Title: Re: Where are these images stored?
Post by: BogdanOntanu on March 06, 2010, 09:52:07 AM
And even IF they were stored in some system DLL or file it is a very bad ideea to read them directly from there. With the next OS update they can move into another file or dissappear completly and in this cases your application would stop working.

When using OS resources it is wise to respect the OS standards and recommendations. Using tricks or workarrounds will always backfire on you. I have seen a lot of applications that worked perfectly on a specific version of Windows and abbruptly stoped working for no reason on the next version of Windows.

Put your enegy into the code you write that is not OS specific.
Title: Re: Where are these images stored?
Post by: Gunner on March 06, 2010, 03:15:53 PM
Thanks Edgar, I will look into that.  Bogdan, it was just a passing thought, figure there was an "easy" way to get my images for the treeview to be the same cross OS, I will just put em into the rc for now.  Thanks for the info
Title: Re: Where are these images stored?
Post by: dedndave on March 06, 2010, 03:49:24 PM
not like they are complex images - you could make your own
but, the user may have selected an alternate theme - your image won't match   :P
Title: Re: Where are these images stored?
Post by: Gunner on March 06, 2010, 04:01:31 PM
Quote from: dedndave on March 06, 2010, 03:49:24 PM
not like they are complex images - you could make your own
but, the user may have selected an alternate theme - your image won't match   :P

That is the whole idea, I want the images to match...
Title: Re: Where are these images stored?
Post by: dedndave on March 06, 2010, 04:41:21 PM
then Edgar has the right advice
if you use the function, it will change as required by the OS and user settings
Title: Re: Where are these images stored?
Post by: hutch-- on March 07, 2010, 08:41:31 AM
Rob,

Its usually the case when you use a Windows control that each OS version controls what that control looks like. The two bitmaps look like a normal check box and if you set the normal check box it appearance will change with each OS version.

I test on 3 interfaces, a Vista black, default XP SP3 and a Win2000 interface and the same app looks different on each. What is important is that you use an XML manifest file to specify the later common control appearance otherwise you get the old style Win2000 interface.