|
-
Nov 6th, 2000, 09:15 AM
#1
Thread Starter
Fanatic Member
I've created a file type called *.pc3
When I activate it the windows icon appearse.
How can I change it's icon?
-
Nov 6th, 2000, 09:20 AM
#2
transcendental analytic
Code:
'in declarations
Declare Function SHChangeNotify Lib "shell32.dll" (ByVal wEventID As Long, ByVal uFlags As Long, ByVal dwItem1 As String, ByVal dwItem2 As String) As Long
Const SHCNE_ASSOCCHANGED = &H8000000
Const SHCNF_IDLIST = &H0
'to use:
SHChangeNotify SHCNE_ASSOCCHANGED, SHCNF_IDLIST, vbNullString, vbNullString
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 6th, 2000, 09:37 AM
#3
Thread Starter
Fanatic Member
To what Icon does it changes the file type to?
-
Nov 6th, 2000, 10:05 AM
#4
transcendental analytic
Oh, i've thought you wanted to update the icons, btw, you just want to do this manually or with code?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 6th, 2000, 02:51 PM
#5
Thread Starter
Fanatic Member
With code to put in my setup program.
-
Nov 6th, 2000, 07:11 PM
#6
transcendental analytic
To do this you need to download my registry module from my homepage. You need to add it to your project for the regval property to work.
1. Open Regedit, search up the extension in classes root and check out the default value of the key.
2. That value is the name of a key in classes root, search for it and open it
3. open the subkey DefaultIcon, for instance for a winamp file it would be
HKEY_CLASSES_ROOT\Winamp.File\DefaultIcon
check out it's default value, it's
D:\SECURED\MUSIC\WINAMP\WINAMP.EXE,1
which is the file that contains the icon, the number that comes after the file is the index you need to specify for files with multiple icons.
4. Copy the Key path, (not the default value), in vb paste this into your regval function:
Regval("HKEY_CLASSES_ROOT\Winamp.File\DefaultIcon\") = yourfilename & "," & youriconindex
Notice you would have to add that "\" in the end of the string. replace yourfilename and youriconindex to suite your needs.
5. Use SHChangeNotify as above to update the icons.
Good luck
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|