Yashied Posted May 9, 2011 Share Posted May 9, 2011 (edited) LAST VERSION - 1.113-May-11This library contains only one function which displays a dialog box that allows the user to choose an icon from the selection available embedded in a resource such as an executable or DLL file. Of course, there is a PickIconDlg() API function but the dialog box created by this library has the following advantages:Ability to resize the displayed icons.Ability to resize the dialog box.Ability to save the window's settings (size, position, etc.) in the registry.Fully customizable appearance a dialog box.More pleasing appearance.IMPORTANT This library registers the following Windows Message (WM):WM_COMMANDWM_CONTEXTMENUWM_GETMINMAXINFOWM_NOTIFYWM_SYSCOMMANDIf you use in your code one of these messages, you should call handlers from this library until returns from your handlers, otherwise, the dialog box will not work properly, for example:Func MY_WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) Local $Result = IC_WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) If $Result <> $GUI_RUNDEFMSG Then Return $Result EndIf ... EndFuncAs usualy, I will be glad to any feedback and suggestions. IconChooser UDF Library v1.1Previous downloads: 71IconChooser.au3Example#Include <IconChooser.au3> Global $Ico = [@SystemDir & '\shell32.dll', 23] $hForm = GUICreate('MyGUI', 160, 160) $Button = GUICtrlCreateButton('Change Icon...', 25, 130, 110, 23) $Icon = GUICtrlCreateIcon($Ico, -(1 + $Ico), 64, 50, 32, 32) GUISetState() While 1 Switch GUIGetMsg() Case -3 ExitLoop Case $Button $Data = _IconChooserDialog($Ico, $Ico, 32, -1, $hForm) If IsArray($Data) Then GUICtrlSetImage($Icon, $Data, -(1 + $Data)) $Ico = $Data EndIf EndSwitch WEnd Edited December 10, 2013 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
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 account
Already have an account? Sign in here.Sign In Now