Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please again! (see below) 1

Status
Not open for further replies.

zigular

Technical User
Jun 29, 2004
18
DE
sorry, i can't use the last infos for solving my problem. have a look at the thread below. please be a bid more precicely. many thanx!

hilmar
 
You have to make the Windows Shell(Explorer) show your icon. The shell knows what icon to show for a specific file extension from the Windows registry

Now, you have to write in the registry 2 keys. For this you should use RegOpenKey/RegSetValue/RegCloseKey(there are plenty of samples in MSDN)

the keys you have to write are
HKEY_CLASSES_ROOT\.{your extension} = {name of file type}
HKEY_CLASSES_ROOT\{name of file type}\DefaultIcon = {name of your executable or icon file},{index of the icon inside executable}

Open the registry(type regedit at Windows\Run) and check the type registration for .inf file as sample

HTH,
PS: this works for sure, I have done this many times from different languages



s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Please, avoid have a look at the thread below posts. It's too hard work to fly over and over this forum. One problem - one thread...
 
dear ionel, many thanks for your perfect description!! ok, this morning i started my comp aaaand what i saw were a lot of nice icons on my files that i was fighting for so long! but this is sth i will not be able to reproduce a second time, that's for sure!! i've only big question marks on my forehead. so, with your hint (and i love hard coded solutions) i'll not have problems in future anymore.

cheers
hilmar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top