playlet Posted March 8, 2010 Author Share Posted March 8, 2010 (edited) --- Edited August 18, 2016 by playlet Link to comment Share on other sites More sharing options...
Yashied Posted March 8, 2010 Share Posted March 8, 2010 (edited) playlet,You have a nice job, but if you do not mind, I'll give you some tips:Of course, _GetRegDefIcon() is a good function, but I have wrote a replacement for this. Look at _WinAPI_AssocQueryString() from the WinAPIEx.au3. #Include <WinAPIEx.au3> Global $Ext = '.au3' ConsoleWrite('(' & $Ext & ')' & @CR) ConsoleWrite('--------------------' & @CR) ConsoleWrite('Type: ' & _WinAPI_AssocQueryString($Ext, $ASSOCSTR_FRIENDLYDOCNAME) & @CR) ConsoleWrite('Command: ' & _WinAPI_AssocQueryString($Ext, $ASSOCSTR_COMMAND) & @CR) ConsoleWrite('Executable: ' & _WinAPI_AssocQueryString($Ext, $ASSOCSTR_EXECUTABLE) & @CR) ConsoleWrite('Icon: ' & _WinAPI_AssocQueryString($Ext, $ASSOCSTR_DEFAULTICON) & @CR)I advise you to use _WinAPI_DrawIconEx() for drawing icons, it looks much nicer. expandcollapse popup#Include <GDIPlus.au3> #Include <Icons.au3> #Include <WinAPIEx.au3> #Include <WindowsConstants.au3> _GDIPlus_Startup () $hImage = _GDIPlus_ImageLoadFromFile ('Playlet_Skin.png') $Width = _GDIPlus_ImageGetWidth($hImage) $Height = _GDIPlus_ImageGetHeight($hImage) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) _GDIPlus_ImageDispose($hImage) $hForm = GUICreate('', $Width, $Height, -1, -1, $WS_POPUPWINDOW, $WS_EX_LAYERED) $hDC = _WinAPI_GetDC($hForm) $hMemDC = _WinAPI_CreateCompatibleDC($hDC) $hSv = _WinAPI_SelectObject($hMemDC, $hBitmap) $hIcon = _WinAPI_ShellExtractIcons(@SystemDir & '\shell32.dll', 130, 32, 32) _WinAPI_DrawIconEx($hMemDC, 118, 12, $hIcon, 32, 32) _WinAPI_DestroyIcon($hIcon) $hIcon = _WinAPI_ShellExtractIcons(@SystemDir & '\shell32.dll', 160, 32, 32) _WinAPI_DrawIconEx($hMemDC, 118, 70, $hIcon, 32, 32) _WinAPI_DestroyIcon($hIcon) $hIcon = _WinAPI_ShellExtractIcons(@SystemDir & '\shell32.dll', 31, 32, 32) _WinAPI_DrawIconEx($hMemDC, 118, 124, $hIcon, 32, 32) _WinAPI_DestroyIcon($hIcon) $hIcon = _WinAPI_ShellExtractIcons(@SystemDir & '\shell32.dll', 130, 48, 48) _WinAPI_DrawIconEx($hMemDC, 175, 180, $hIcon, 48, 48) _WinAPI_DestroyIcon($hIcon) $tSize = DllStructCreate($tagSIZE) DllStructSetData($tSize, 1, $Width) DllStructSetData($tSize, 2, $Height) $pSize = DllStructGetPtr($tSize) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, 'Alpha', 255) DllStructSetData($tBlend, 'Format', 1) _WinAPI_UpdateLayeredWindow($hForm, $hDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA) _WinAPI_ReleaseDC($hForm, $hDC) _WinAPI_SelectObject($hMemDC, $hSv) _WinAPI_DeleteDC($hMemDC) GUISetState() Do Until GUIGetMsg() = -3 _GDIPlus_ShutDown ()IMHO there is no reason to create PL_Includes.au3 file and put to this file native AutoIt functions. They come with AutoIt. Edited March 8, 2010 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...
playlet Posted March 8, 2010 Author Share Posted March 8, 2010 (edited) --- Edited August 18, 2016 by playlet Link to comment Share on other sites More sharing options...
Yashied Posted March 8, 2010 Share Posted March 8, 2010 (edited) I did this because the goal of this launcher is to reduce compiled size as much as you can, even with all those skins. AutoIt includes include way more functions which then increase size of compiled exe.Yes, but ~100KB above is not serious. But if the UDF will be updated, you have to re-write PL_Includes.au3, however, it's of course your case. Edited March 8, 2010 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...
Yashied Posted March 8, 2010 Share Posted March 8, 2010 And yet, it would be good to do so, that would be the active window did not lose focus when you hover on your launcher. 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...
playlet Posted March 9, 2010 Author Share Posted March 9, 2010 (edited) --- Edited August 18, 2016 by playlet Link to comment Share on other sites More sharing options...
Yashied Posted March 9, 2010 Share Posted March 9, 2010 Why do not you do the same for small icons? 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...
MHOrhan Posted March 9, 2010 Share Posted March 9, 2010 (edited) HiDid you compile my original version or did you make some changes and then compile? Try deleting "Config.ini", I've made some changes to ini file.I wish people gave me more feedback about this launcher. Does it work on all Windows versions?Hi,I don't make any changes, used to original version, download, compiled and tryed, but 4.0.5.2 is same again.Skin and buttons is not shown, I look in the config.ini, see any changes, but everythings is normal:S(I wish people gave me more feedback about this launcher. Does it work on all Windows versions?)Yes I'm used on Xp Vista and win7, worked. Edited March 9, 2010 by MHOrhan Link to comment Share on other sites More sharing options...
Shafayat Posted March 9, 2010 Share Posted March 9, 2010 I tried on windows xp and seven. Both x86, Both worked great. I actually hate vista more than I love this launcher. So, I won't set up vista just to try this. But I can't see why this shouldn't work. [Not using this account any more. Using "iShafayet" instead] Link to comment Share on other sites More sharing options...
dantay9 Posted March 9, 2010 Share Posted March 9, 2010 I second the ability for not being able to activate the launcher without losing the focus of the previously active window. I think that would be a great addition, but I can't test any code. I am at school. Link to comment Share on other sites More sharing options...
playlet Posted March 9, 2010 Author Share Posted March 9, 2010 (edited) --- Edited August 18, 2016 by playlet Link to comment Share on other sites More sharing options...
Yashied Posted March 9, 2010 Share Posted March 9, 2010 ...is there some easier way to set icon (picture) obtained with _WinAPI_ShellExtractIcons() to guictrlcreatepic?_SetHIcon() ??? 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...
playlet Posted March 9, 2010 Author Share Posted March 9, 2010 (edited) --- Edited August 18, 2016 by playlet Link to comment Share on other sites More sharing options...
Yashied Posted March 9, 2010 Share Posted March 9, 2010 I'm having some problems with _SetHIcon(), can you show me how to use it?What is the problem?I figured it out!! Will update script as soon as possible.No, I gave you a simple example. You run it? 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...
picea892 Posted March 9, 2010 Share Posted March 9, 2010 (edited) Ok, I will change @SW_SHOW to @SW_SHOWNOACTIVATE in my next update. Is there some way to avoid losing focus from active window when you click on the launcher?Wraithdu solved this problem in this postI can't say it is easy though Edited March 9, 2010 by picea892 Link to comment Share on other sites More sharing options...
dantay9 Posted March 9, 2010 Share Posted March 9, 2010 This is post by Melba is a better example. This example "eats" the message from the message queue instead of reacting to the message. Link to comment Share on other sites More sharing options...
playlet Posted March 9, 2010 Author Share Posted March 9, 2010 (edited) --- Edited August 18, 2016 by playlet Link to comment Share on other sites More sharing options...
Yashied Posted March 10, 2010 Share Posted March 10, 2010 If you decide to use the skins (WS_EX_LAYERED), I recommend you forget about any controls. Use the main image as a base and just draw on top the required elements (icons). Look at my Calculator, there were no controls, only GUI that is updated by using _WinAPI_UpdateLayeredWindow() function. The mouse position is controlled in a loop with GUIGetCursorInfo(). What came of it, you can see themselves. That is what I tried to show you. Of course, you will have to rewrite your code, but it's worth it. Anyways, the solution for you. 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...
playlet Posted March 12, 2010 Author Share Posted March 12, 2010 (edited) --- Edited August 18, 2016 by playlet Link to comment Share on other sites More sharing options...
Shafayat Posted March 12, 2010 Share Posted March 12, 2010 That's great! Really beautiful. [Not using this account any more. Using "iShafayet" instead] 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