Tvern Posted July 23, 2008 Share Posted July 23, 2008 (edited) After messing around for hours I decided it was time to get some help. I'd like to use a few icon controls instead of buttons to maky my script look better. I've included the icons in my compiled script using compile with option, wich added the following to my script: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=ico\Library.ico ;the icon the exe will use #AutoIt3Wrapper_Res_Fileversion=1.0.0.1 #AutoIt3Wrapper_Res_Icon_Add=ico\user_remove.ico ;control icon 1 #AutoIt3Wrapper_Res_Icon_Add=ico\user_add.ico ;control icon 2 #EndRegionoÝ÷ Øý½ë¬yÚÞ²«qèZrG«¶!yÉ"~Ø^Ê'³^è§r[yÖ§vØ^ɪ޶«yIÝz¸¢{-ì¢g®§Ø^¢·b©gjg¬çF§wg¢Ú®×¬º·°«m«fy©ìRw^®'( èº-ì¢g®¥«6ÓV§wm6#ozëte Úå ·µâ¢{h±ëÞ©brì~º&²¥}V§tazr¢é]ë-ºÇéz¶¬¶¢µé§jg¡£¯z²j}ý¶ÛhÂä~æÉì^N¬É²{¦¦W¬r¸©µ«¢+ØÀÌØí¥½¸ôÅÕ½ÐìÅÕ½Ðìí$ÍÍÕµ$¹Ñ¼ÁÕÐͽµÙ±Õ¡É°ÕС½Ü¼$¥¹Ñ¡É¥¡Ð½¹ü)U% ÉÑ ÅÕ½ÐíÑÍÐÅÕ½Ðì°ÈÀÀ°ÈÀÀ¤)U%MÑMÑÑ ¤)U% Ñɱ ÉÑ%½¸¡MÉ¥ÁѥȵÀìÅÕ½ÐìÀäÈíÁÉÍȹáÅÕ½Ðì°ÀÌØí¥½¸°ÄÀ°ÄÀ°ÄØ°Äؤ()]¡¥±U%Ñ5Í ¤±ÐìÐì´Ì)]¹ I've been able to use the icon used by the exe (Library.ico), but how do I find the values for the other icons I added? I hope someone can point me in the right direction. Thanks in advance. Edit: If this can be done using pictures instead of icons that would be nice too. Edit2: Ofcoarse I figured it out after asking for help muttley using the number of the imagegroup for $icon works. If anyone can tell me how to specify a specific icon in that imagegroup (when including a multi resolution icon) that would be cool though. Edited July 24, 2008 by Tvern Link to comment Share on other sites More sharing options...
smashly Posted July 24, 2008 Share Posted July 24, 2008 There's a way to use an RT_ICON from an RT_GROUP_ICON, but it's not short. It involves the functions LoadLibrary(), ResourceEnumNames(), FindResource(), LoadResource(), SizeOfResource(), LockResource(), CreateIconFromResource(). If the RT_ICON is a PNG icon then also CreateStreamOnHGlobal(), GdipCreateBitmapFromStream(), GdipCreateHICONFromBitmap(). All the above functions I'm using in icon viewing & extraction utility I've written and posted recently to do exactly "how to specify a specific icon in that imagegroup (when including a multi resolution icon)". Sorry I don't have a brief simple example to demonstrate the above on hand atm. But you can work it all out using Zedna's Resources.au3, ProgAndy's BinaryImage.au3 and MSDN. Cheers Link to comment Share on other sites More sharing options...
ptrex Posted July 24, 2008 Share Posted July 24, 2008 @TvernMaybe this can get you started.Icons In ExeRegards,ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Tvern Posted July 24, 2008 Author Share Posted July 24, 2008 Thanks for the responses. I played around a bit trying to find the right resolution icon, but since I am adding the icons myself it's easier to just add more single icons. Atleast it's working now. muttley Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now