AutoHotkey Community

It is currently May 27th, 2012, 5:02 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: April 27th, 2010, 1:42 am 
Offline

Joined: May 3rd, 2009, 6:37 pm
Posts: 67
I've been trying to set my GUI an icon that resides on the shell32.dll file but my code doesn't seem to work. Anyone who ever done this kind of stuff?

Code:
#Persistent

Module = C:\WINDOWS\SYSTEM32\SHELL32.DLL
ModuleHandle := DllCall("GetModuleHandleA", Str, Module )
hIcon := DllCall( "LoadImageA", Uint, ModuleHandle, Str, 135, UInt, 0x1, Int,32, Int,32, UInt, 0x10 )

Gui, +LastFound

SendMessage, 0x80, 0, hIcon
SendMessage, 0x80, 1, hIcon

Gui, Show, w640 h480

Return


Any input would be nice.

been following http://www.autohotkey.com/forum/topic22757.html
http://www.autohotkey.com/forum/viewtop ... n+resource


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 27th, 2010, 2:11 am 
Offline

Joined: May 3rd, 2009, 6:37 pm
Posts: 67
EDIT: FIXED

going to leave my working code for future reference.

Code:
#Persistent
ModuleHandle := DllCall("GetModuleHandle", "str", "shell32.dll")
hIcon := DllCall("LoadImage", "Uint", ModuleHandle, "Uint", 135, "Uint", 1, "int", 32, "int", 32, "Uint", 0x8000)
Gui, +LastFound

SendMessage, 0x80, 0, hIcon
SendMessage, 0x80, 1, hIcon

Gui, Show, w640 h480

Return


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 79 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group