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
1915 Views

Similar Articles

[PageSpeed] 57

"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 (356)
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 (3236)
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:

What does red cross icon mean beside server name in SSMS in sql 20
I am using sql server 2008. I just notice there is red cross icon beside server name in SSMS. Can anyone tell me what it means? Thanks Can you make sure that SQL Service is started for that instance? "Iter" wrote: > I am using sql server 2008. I just notice there is red cross icon beside > server name in SSMS. Can anyone tell me what it means? Thanks the servive is started, I can use it. But still have red cross icon in my SSMS. "Amol Lembhe" wrote: > Can you make sure that SQL Service is started for that instance? > > "Iter&qu...

How do you change the sheet size?
I'm printing a candy wrapper 5" x 4.75". When I go to print preview there is a sheet of paper 8 1/2 x 11 under the wrapper. It puts the wrapper in the middle of the paper sooo when I print I only get a quarter of the paper. My printer handles paper size 3" x 3". Can anyone help. Thanks You need to make sure that both your Publisher page size and your printer are set for the proper size paper. -- JoAnn Paules MVP Microsoft [Publisher] ~~~~~ How to ask a question http://support.microsoft.com/KB/555375 "phalensun" <phalensun@discussions.microsoft....

Unable to Access Money after changing password
My husband changed our Microsoft Passport password and now I am unable to access our Microsoft Money files. I've tried both the new and old password but neither work. ...

Autoarchive and modified date
I have OUtlook 2003 that I upgraded to on Windows XP. The autoarchive seemed to be a nice feature for me. I upgraded or imported my email from outlook express which has mail from 4 years ago in it. After a day of checking, I found that autoarchive was not working as expected because the the modified date of all emails were changed on import ! Q1: Is there any way to manually change the modified date of an email to be different ? Q2: Is there any way to stop autoarchive from using the modified date for archiving ?? Q3: (on a different note because I can't find it) In the autoarchive op...

Conditional Formatting for Changes to cells
I want to use either conditional formatting or change tracking to change the font color on any changes made to a spreadsheet by a user. Just one user will be using each spreadsheet but the changes are then submitted to someone for data entry into the big iron. Thanks dick Right-click the sheet tab, select View Code, enter this: Private Sub Worksheet_Change(ByVal Target As Range) Target.Interior.Color = vbRed End Sub Bob Umlas Excel MVP "Dick Stapleton" <dick.stapleton@coldist.com> wrote in message news:uxK7%23IqvJHA.4928@TK2MSFTNGP03.phx.gbl... >I want to u...

How can I change a cell value based on another cells color?
I have many different values on a large spreadsheet. I am wondering if there is a way to change a cell value to match another cell value based on the second cells color? For example, I would need to change cell A1 to a value of 10 so it matches cell A2's value of 10, because cell A2 is highlighted in green. I am not familiar with macros, is this something that would require a macro? There's no built-in feature that will change a cell's value based on the colour of another cell. You would need to use code to accomplish this. Chip Pearson has information on using colours in ...

Changing default
I have been able to set up my aol e-mail account on Outlook. However, the Personal Folders file I have keeps coming up as my default for Outlook Today, calendars etc. I can access my e-mail etc. but would like it too be in my Personal Folders file. I can't seem to move information into it to override the blank settings in Personal Folders. Is there anything I can do? Tnanks. Since you can access AOL only via IMAP in Outlook, I don't think you can do this. condovail@aol.com wrote: > I have been able to set up my aol e-mail account on > Outlook. However, the Personal...

Excel chart changing colour when pasted to word.
When pasting a chart from Excel to Word. The Excel chart loses its colours. The colour it loses are the more complex ones like grenn with white vertical stripes and plain colours don't cause a problem. ...

Auto Complete tasks from Sales Process when stage changed
Hi Guys I have set up a sales process with 6 stages with 4 tasks each. When An Opportunity is created it automatically creates the sales process and stage is Stage 1. When I change the stage to Stage 4, how can I make all the activities/tasks in the previous stages as completed as at the moment they display as either open or pending? Thanks you can do this through workflow or writing .net assembly to mark them completed. -- Regards, MS CRM Certified Professional http://microsoftcrm3.blogspot.com Chat with me on MSN / Gmail / Skype : ID Is :.. mscrmexpert@gmail.com "Sukh&q...

Combo box needs to change query when other combox changes
Process: After selecting the first combo box, the second combo box need to be populated with a particular query based on info from the first. 1st Combo box: Type (there are 4 different types) 2nd Combo box: Query need to change based on Type (there are 4 queries). What you are describing is called Cascading Combo Boxes. This link should help: http://www.fontstuff.com/access/acctut10.htm MDS wrote: >Process: After selecting the first combo box, the second combo box need to be >populated with a particular query based on info from the first. > >1st Combo box: Type (there are 4 di...

How do changes to a template cascade to docs created from it befor
I have introduced a Date field in my template but it won't appear on the documents I created before making the change, but from the same template. I activated the automatically cascade style changes option but it still didn't help. Any ideas anyone? Cheers! Automatically update document styles does not add or change document content. You'll have revise the documents manually or use a macro. Pam Seb Golding wrote: >I have introduced a Date field in my template but it won't appear on the >documents I created before making the change, but from the same tem...

How do I change all contacts' "Display As" field
Hello, In most of my contacts, the Display As field contains only the email address of the contact. If I delete that field and hit Tab, Outlook automatically changes the Display As field to the contact's name followed by the email address in parenthesis. I would like all of my contacts to have this format (name followed by email address in parenthesis). Is there a way to change this all at once without changing them one by one? ...

Internet Connection Icon
The Icon which normally sits beside the Icon for the Local Area Connection has disappeared How can I reinstate it? I find it useful to check my Broadband speed Blair And, what, pray tell, is the icon you are referring to? Mine is a speaker and the Google talk icon. Only you know which one you are talking about. "bm" <Darroch@aol.com> wrote in message news:ej04ppDJLHA.4320@TK2MSFTNGP04.phx.gbl... : The Icon which normally sits beside the Icon for the Local Area Connection : has disappeared : How can I reinstate it? : I find it useful to check my Broadband sp...

Change Entourage Colours
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: pop Entourage 2008 is using 'soft' mauve colour to highlight day of the week and other items. <br><br>How do I change this? > This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3355914746_5534079 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: 8bit On 5/5/10 10:48 AM, in article 59bb8022.-1@webcrossing.JaKIaxP2ac0, "Markb56@officefor...

Changing page size and retaining header and footer
I changed my page size to 7 X 10. Now Word 2003 will not let me change it back to 8.5 X 11 (standard page size) and the header and footer will not show unless I go to View and click on them. I have tried File--page set-up, etc. with no luck. It says that it is set at 8.5 X 11, but that is NOT what shows on the screen. HELP!! See http://www.gmayor.com/white_space.htm -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://...

Birthdates change depending on computer
Strange problem... We have CRM 3.0 which was an upgrade from 1.2 run from SBS 2003 SP 1. Client machines are using Windows XP Pro, CRM 3.0 Outlook Client. When someone enters in a birthdate in a CRM Contact from Outlook Client 3.0, the birthdate sometimes changes one day. We have had two clients looking at the same Contact and viewing the two different birthdates at the same time. Both client machines have their time set by the SBS 2003 and are on the same day, time and both set to Central Standard Time. It has happened several times when one person enters the client birthdate, from...

Version 9 user able to change password but then new password doesn
We have people testing version 9 right now. 3 users were able to change their password when prompted, then continue to log in. 3 users were prompted to change their password, but then when they used the new password received the error "login failed." We are testing on ONE citrix server using ONE system DSN, so it is not a DSN issue. When I shadowed the session of the user having the issue, I could not use my login either, but only sa would work. Again, this is ONE citrix server, using ONE DSN. There are no user DSNs setup. Why is one profile not working and others are??...

changing Text to Currency
I have been supplied with data extracted from a third party database. I have two CSV files for two different tables. I have also been given an Access 2003 database that the two CSV tables have been imported into and linked via a query. The problem is that one of the fields should be a number with two decimal place. It currently exists a text field in Access and display "AU $" in front of the numbers. ie. I need to change the text field from "AU $12.5" to a Currency field "12.5". Can't seem to find the way of dropping the charactar "AU $" ...

How to notify all of email Domain change
Hello :) I need some help with Exchange. A customer of mine are changing their e-mail domain, and wants to let all who sends them e-mails to be noticed of the new domain. Now they have two e-mail domains registered on the same server. They want to send a message to all who uses the old domain name that they should change their e-mail addresses to the new domain name Anybody knows about a way to do this? Best regards Monica Change reply address for everybody, make sure old address is staying with each recipient and run it like this for couple of years. Monica wrote: > Hello :) ...

changing worksheet reference name when copying down cells
I have a yearly summary worksheet by week. Each week i add the weekly report to the workbook. I need a formula on the summary sheet that will change the worksheet name when I copy it down. Is there any way to do this? Would send a copy of my workbook but nowhere to attach it. -- ferne Yes, list you worksheet names in any Column and use INDIRECT. -- Regards Dave Hawley www.ozgrid.com "ferne" <ferne@discussions.microsoft.com> wrote in message news:03F6D9ED-544F-48F9-8C54-3A558210DE2F@microsoft.com... >I have a yearly summary worksheet by week. Ea...

How to change the icons on excel folders?
I AM TRYING TO USE DIFFERENT ICONS TO SEPERATE LIKE FOLDERS BUT CANNOT FIGURE HOW TO DO THIS Same as you would change for any folder. Right-click on the folder and Properties>Customize>Folder Pictures>Choose Picture. Browse to and select a picture and Apply. Note: folder picture only seen in Thumbnails View. Gord Dibben MS Excel MVP On Sat, 12 Dec 2009 06:35:01 -0800, Martin <Martin@discussions.microsoft.com> wrote: >I AM TRYING TO USE DIFFERENT ICONS TO SEPERATE LIKE FOLDERS BUT CANNOT FIGURE >HOW TO DO THIS ...

Changing Y axis scale
I have created a chart that has the following data: 50 45 35 25 The y scale starts at 0 and goes to 100. How do I change the scale? -- Thanks, John Hi, Double click the Y axis to display the format dialog and then check out the Scale tab. Cheers Andy John wrote: > I have created a chart that has the following data: > > 50 > 45 > 35 > 25 > The y scale starts at 0 and goes to 100. How do I change the scale? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info ...

Horizontal Axis Options Changing
Excel 2007 I have noticed that the horizontal Axis options can change in an Excel 2007 chart, which is driving me crazy. On some charts when I open the horizontal axis options, under Axis options, they start out with "Interval between tick marks", "Interval between labels" and so on, which is what I expect to see. On another chart, with the exact same layout and data (just the numbers are different for the data), when I right click the horizontal axis and choose Format Axis, the Axis Options start out with Minimum, Maximum, Major Unit, Minor Unit and so on. The options, ...

How do I change cell that contains a formula to an actual number
I would like to use the results of a formula in a cell as an actual number. Any help would be appreciated? Hi copy the cell and use 'Edit - Paste Special - Values' -- Regards Frank Kabel Frankfurt, Germany "Carlton A. Barlow" <CarltonABarlow@discussions.microsoft.com> schrieb im Newsbeitrag news:D8B1F514-E50A-4CB8-98B5-50D6FAA4B739@microsoft.com... > I would like to use the results of a formula in a cell as an actual number. > Any help would be appreciated? An easy way to do this is when editing the formula just type cntl+"=". It immediately chan...

Changing the default sort order of Inbox
I would like to change the startup sorting order of my inbox in Outlook. For example, I would like to have the most recent emails on the top of my list (Received column) when the progam first starts. Just pressing the column header to change the order, moving the selection to the top of the list, then closing Outlook does not achieve this. It does not remember my last sort and the sort order reverts to new emails on the BOTTOM of the list. I would like the reverse of this. Any ideas? "alanporter" <alanporter@discussions.microsoft.com> wrote in message news...