icon changes with change of extension

when we change the extension of a  file in windows, its icon also
changes.....
how does windows do tht.
in my application i require a  similar approach. i want the icon to be
dependent on the file extension not on the attributes of the file.
i have gone trough the registry but things are not very clear.  Windows
has listed all the file extensions avaliable there, but there is no
general way to extract icons for those extension...
kindly help

icon changes with change of extension

0
nemesia31 (18)
10/19/2006 4:38:59 AM
vc.mfc 33608 articles. 0 followers. Follow

6 Replies
613 Views

Similar Articles

[PageSpeed] 12

"Neelu" <nemesia31@gmail.com> wrote in message 
news:1161232739.720722.120950@b28g2000cwb.googlegroups.com...

> when we change the extension of a  file in windows, its icon also
> changes.....
> how does windows do tht....

Extensions are listed in the HKEY_CLASSES_ROOT section of the registry where 
they are mapped onto document types.   Document types are also listed there 
and the information about the icon is one of the entries.

So eg  (if NotePat is your standard .txt handling program)  .txt will be 
mapped onto txtfile and the txtfile\DefaultIcon entry will tell windows 
where to find the icon.  The entry includes a file whose resources hold the 
icon and in index telling it which icon in those resources it is.

Dave
-- 
David Webber
Author MOZART the music processor for Windows -
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm


0
dave1 (355)
10/19/2006 6:41:57 AM
Take a look at the thread "Displaying Windows icons in ListBox".  The same
approach can be applied to your code.

AliR.

"Neelu" <nemesia31@gmail.com> wrote in message
news:1161232739.720722.120950@b28g2000cwb.googlegroups.com...
> when we change the extension of a  file in windows, its icon also
> changes.....
> how does windows do tht.
> in my application i require a  similar approach. i want the icon to be
> dependent on the file extension not on the attributes of the file.
> i have gone trough the registry but things are not very clear.  Windows
> has listed all the file extensions avaliable there, but there is no
> general way to extract icons for those extension...
> kindly help
>
> icon changes with change of extension
>


0
AliR3470 (3234)
10/19/2006 3:19:28 PM
well, i had gone to tht part, but tell me h9ow to associate d file in
case it is a .jpeg file.
it is not mapped to anything of d sorts .txt is mapped to

0
nemesia31 (18)
10/23/2006 10:38:33 AM
well, i had gone to tht part, but tell me how to associate d file in
case it is a .jpeg file.
it is not mapped to anything of d sorts .txt is mapped to

0
nemesia31 (18)
10/23/2006 10:38:40 AM
well, i had gone to tht part, but tell me how to associate d file in
case it is a .jpeg file.
it is not mapped to anything of d sorts .txt is mapped to

0
nemesia31 (18)
10/23/2006 10:39:31 AM
well, i had gone to tht part, but tell me how to associate d file in
case it is a .jpeg file.
it is not mapped to anything of d sorts .txt is mapped to

0
nemesia31 (18)
10/23/2006 10:39:38 AM
Reply:

Similar Artilces:

Change bkgnd colour for some words in CRichEditCtrl?
I'd like to be able to change the background colour for some of the text in a CRichEditCtrl. I'm comparing two files side-by-side in these controls and need to be able to highlight some text to illustrate the results. I could just change the text colour and make the font bold and/or larger, but highlighting similar to when text is selected would stand out better, especially if I could also change the text colour to suit. Is this possible? (I've seen it in some programs, but don't know if a CRichEditCtrl was used.) Any help appreciated, Steve C. ...

unable to read file with "xlw" extension
I have an old but very important file with a "xlw" extension which I cannot open with Excel. When I tried to open it, some error message came up indicating the file cannot be accessed, as though the file is not there. Any idea? Sounds like a workspace file, which contains information about workbooks, but not the workbooks themselves. So the workbook files may not be able to be accessed... You'll need to find the workbook files. From XL Help ("Save a group of workbooks in a customized workspace") > You can open a group of workbooks in one step by creating a work...

Gray icon from icon
Is there any system-fn to paint a given icon in grayscale? ...

See last changes in sqlserver
This is probably a novice question but I cannot find it: Say you are debugging a program, you replay the error, and you want to see which database files are effected, how can you see that? Is there a way to get the latest changed date for a entity, is there a log file where you can see which statements where executed the last five minutes? For example my database exist out of customer, product, order, company files/entity I want something like file updated customer 17-05-2010 product 17-05-2010 order 05-05-2010 company 17-05-2010 And then conclude:...

how i do enable icons in excel
some of icons doesnt work like chart , scenario ... when i go to customise its appear active when i closed its back to an active how can slove this problem thanks salah If the workbook is shared Insert>Chart and Tools>Scenarios will be grayed out(unavailable). Check at Tools>Share Workbook to see if book is shared. Gord Dibben Excel MVP On Sun, 24 Apr 2005 03:24:07 -0700, "salah" <salah@discussions.microsoft.com> wrote: >some of icons doesnt work like chart , scenario ... > >when i go to customise its appear active when i closed its back to an activ...

changing send/receive to receive/send
According to my host, I need to change the option on my Outlook 200 to check for new messages before it sends any messages. The default is the opposite. Who knows how to change this option? In your email account settings, on the "outgoing server" tab "Caleb G" <caleb@sharedlight.com> wrote in message news:020d01c3463e$039cf300$a301280a@phx.gbl... > > According to my host, I need to change the option on my > Outlook 200 to check for new messages before it sends any > messages. The default is the opposite. Who knows how to > change this option? C...

=9/10 does not calculate --- did I change an option?
I am accustomed to calculating in a cell by typing "=" and then a formula, such as 9/10 or 2+8, and having the result appear in the cell. Now, the calculation does not happen, and it just puts the text "=9/10" in the cell. I must have changed an option, but am not able to find one that gets the old behavior back. Any help on how I might restore calculation would be greatly appreciated, many thanks in advance. Jim The cell in which you entered the formula was formatted to TEXT prior to your typing it in. Just changing the format to General or Number is *not* good enoug...

Icons and transparency
Hi guys I have 32*32 16 color icon, but I need a transparent background on it. I'm using it on a column header but I get a white background with what I thought was the transparent colour. I have used the VS7 icon editor, but it's not clear how to set the transparent colours. Any help would be most appreciated. TIA Tony In the header of which control are you trying to show the icon? Is it a list view, an owner drawn control, a third part control...? How are you loading the icon? From where the icon come from? Is it inside an image list? -- Regards Rodrigo Corral Gonz´┐Żlez...

Convert from Excel and change field to Autonumber
Hi, I have an Excel file which I have opened in Access to create an access table which is fine. I am now quickly going through the fields to tweak them to what they should be but the Excel file was created from a Lotus Approach database that had a field which was autonumber. Obviously when I try to change the field in the Access database it tells me that it can not do this as there is data in the table. What is the proper procedure to do this and either make the field an autonumber field during conversion or after? -- Dan Pickard ----------------------------- Powerful Windows 2003 ...

Is there an "expand all" icon for the "by sender" view?
Wow, was playing around with all the views this morning and came across the "by sender" one. It could be super fantastic. It's not good as it is now as the default mode doesn't help much, and I couldn't seem to find it, but was hoping someone could point me in the right direction to where the "expand all" feature for it. Thanks so much! ...

Changing mail Form
I would like to change the new mail form permanently on my outlook 2003 client. I have created the form template I wish to use and saved it and can use it if I choose it, but do not know how to set as the permanent default for when opening the send new message button. Thanks in advance. Why do you want to do this? Using a custom form as your message form will make it difficult to send attachments to non-Outlook recipients. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcod...

How does one change the sample number. Instead of zero my workshe.
My Excel work sheet displays a -1 when it should read zero. When right click and go to format cells and number I see that a -1 is in the sample section. However, I can not change it to zero. John Why do you think it should read zero? What value is in the cell? A computed value that you feel should be zero? If you type in a zero you should see 0 If you type in -1 you will see -1 Gord Dibben Excel MVP On Thu, 14 Apr 2005 15:40:02 -0700, "John" <John@discussions.microsoft.com> wrote: >My Excel work sheet displays a -1 when it should read zero. When right click ...

Prompt to save when no changes made
I have a file that was coverted from 1997 version of excel to the 2003 version of excel. The file has no volitile functions (eg. "now" formula, "offset" etc), however I am prompted to save changes on closing the file, even when no changes were made. I am on automatic calculation, but this ususally has no effect on the save prompt. How do I stop Excel from prompting to save when no changes were made? Thanks Hi some ideas: - really no volatile function?? - maybe an event procedure which changes something in the background - does this happen only after saved in Excel...

Notification Area System Icons Have Disappeared
When I go to the Notification Area properties, only the "Clock" option is checked. The "Volume", "Network", and "Power" options are un-checked AND grayed-out so I can't check them. How do I get these system icons back? (I'm running Vista Home Premium-SP2, and the only recent changes have been "Windows Updates" - critical updates only.) Thanks. -- Bob C. Updates will do that sometimes. When it happens to me, I reboot a second time and then check the boxes again. If that doesn't work, I go to the Network Manag...

HELP Outlook send/receive mail icon every 30 or so seconds
I am running office xp, outlook 2002. I just installed dsl broadband with a dual connect modem. The broadband tech originally set modem up as bridge and all was fine except I had to use windows dialer for connection. Next tech resolved the problem ?? by setting modem up as router. BIG TROUBLE, Outlook would hang, slow loadup and just have all sorts of problems. I did a system restore and brought system back to where modem was before it was changed to a router. Problem is, outlook is now showing the send/receive mail icon every 30 seconds, however it is not actually sending or receivi...

Excel 2003 won't let me change Xlabels from scientific notation
For some reason, when I type in bin bounderies for a histogram as: 0.0000 , 0.025, 0.050...... 0.175, 0.200 excel keeps changing them to exponential/scientific format, which not only takes up a lot of space, but just looks dumb. How can I force excel to show the labels the way I want? reformat the cells? -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "CVb" <seavey@cs.wisc.edu> wrote in message news:1135894875.875593.297240@g49g2000cwa.googlegroups.com... > For some reason, when I type in bin bounderies for a histogram as: > 0.0000 , 0.025, 0....

Icon Sets Conditional Formatting in Excel 2007
So, I want to be able to use the Icon Sets in conditional formatting with text values. I bet there are a bunch of other people out there that would like to have the text "green", "yellow" or "red" converted to the appropriate stoplight icon, but I cannot figure out how to make this work. Is it possible? Excel 2007 Icons Maybe not quite what you wanted... http://www.mediafire.com/file/dytjrggnxbm/09_26_09.xlsx On Sep 26, 9:27=A0am, Herbert Seidenberg <herbds7-ms...@yahoo.com> wrote: > Excel 2007 > Icons > Maybe not quite what you wanted...http://ww...

Changing Portfolio Views
MS Money Deluxe Deluxe, Win XP Sp3 Online updates expired. If I remove a column from a custom or pre-set Portfolio View and then save it, it wipes out all of the columns and they can't be restored. If this is a result of the online updates having expired then this program is done. It's over. Don't try this without a current backup. HTH -Kevin N. This was apparently some sort of glitch. The next morning I could edit the columns without incident. Whew! "Kevin" <nospam@nospam.com> wrote in message news:uGOD9eE3KHA.4964@TK2MSFTNGP05.phx.gbl... >...

Owner Change on case -SQL Error
I am getting a MS SQL Alert box when ever I try to change the owner of a case. Any clues how to debug or resolve this ? ...

Change Measurement units
Is there any way I can change the measurement units, so that when I open a new document it is inches instead of cm. I'm using Publisher 2002 Thanks in advance Tools | Options | General -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://www.mvps.org/word Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "RK" <rkelseyca@yahoo.com> wrote in message news:bfp2s6$nj$1@nntp-stjh-01-01.rogers.nf.net... > Is there any way I can change the measurement units, so that when I op...

Change Order date?
I have situation where we had to enter some orders into CRM like 3 weeks after the fact but there was no way to to back date them when entering so that they fall into the proper months reports, etc. Any help out there on how I can change the dates at the database level? Look in the SalesOrderBase table. Mike "SteveT" <drumguy61-google@yahoo.com> wrote in message news:4635de59.0402120638.1bd39e41@posting.google.com... > I have situation where we had to enter some orders into CRM like 3 > weeks after the fact but there was no way to to back date them when > entering ...

more than 16 colors icon
Can I use more than 16 colors icon in OutlookBar's shortcut? Even I use a true color icon, it shows in 16 colors. :-< ...

How do I change the name at the bottom of the calendar?
When I print out the calendar, the previous ofice managers' name appears at the bottom, how do I change that? "ACritchfield" wrote in message news:9CCE1BDD-8453-4025-B3F5-EE4955F1BC74@microsoft.com... > When I print out the calendar, the previous ofice managers' name > appears at > the bottom, how do I change that? Search the registry for your manager's name. It was probably the name and company he specified during the install of Windows. ...

programmatically changing size of continuous forms
I know you are not supposed to double post, but I accidentally posted first to a newsgroup that appears to be no longer active (microsoft.public.access.formsprogramming). So, I am trying here as well. I've tried searching the internet in a variety of ways to get this one, but can't find it. I have a continuous form that opens at first with no records and the Detail section's visible property set to No. The user selects a criteria from the combo box (e.g., cboCriteria) in the header, the after_update event of which goes something like this: lngID=me...

Revalue Account by Net Change vs Period Balance
The help file says: ------------------------- Revaluation can be based on the net change amount for the revaluation period or based on the period balance. Net Change Mark Net Change to revalue the selected account based on the net change, or the difference in the account's beginning and ending balances for the revaluation period. Period Balances Mark Period Balances to revalue the selected account based on the period balance, or the current balance of the account on the last day of the revaluation period. ------------------------- How would these options be any different? I thought t...