4ggr35510n Posted July 31, 2010 Share Posted July 31, 2010 (edited) Hi all! Im asking for ur knowledge and mercyful guidance: Using $WS_EX_TOOLWINDOW I can create not-appearing-in-task-bar window.My three little, easy question about that:1. Is it possible to create normal title-style window that not appears in task bar? (toolwindow causes smaller title font, no mini/maximizeboxes which is really unwanted by me)2. Toolwindow also causes not appearing window in alt+tab dialog box. Can I create window that not appears in task bar, but appear in alt+tab box? (or vice versa)And about menu-icons:3. How can I create picture(jpg?png?bmp?) Icons next to MenuItems in MainMenu and ContextMenu? I'll really appreciate ur help!Regards,4gre5510n Edited July 31, 2010 by 4ggr35510n Link to comment Share on other sites More sharing options...
doudou Posted July 31, 2010 Share Posted July 31, 2010 (edited) 1. Is it possible to create normal title-style window that not appears in task bar? (toolwindow causes smaller title font, no mini/maximizeboxes which is really unwanted by me) 2. Toolwindow also causes not appearing window in alt+tab dialog box. Can I create window that not appears in task bar, but appear in alt+tab box? (or vice versa) 1. Yes, but you will have to create a hidden window first and display your actual GUI as child dialog (s. example below). 2. Yes - exactly like 1. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $main = GUICreate("Main") GUICreate("Actual GUI", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CAPTION, $WS_DLGFRAME), 0, $main) GUISetState() ;Show GUI While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete() And about menu-icons: 3. How can I create picture(jpg?png?bmp?) Icons next to MenuItems in MainMenu and ContextMenu? Take a look at _GUICtrlMenu_SetItemBmp() from GuiMenu.au3 (standard UDF) and corresponding help topic (it shows a code sample). Edited July 31, 2010 by doudou UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 1, 2010 Moderators Share Posted August 1, 2010 4ggr35510n (and doudou),You can also use the ever-present, but hidden, AutoIt window as the parent: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("Actual GUI", 640, 580, Default, Default, BitOR($WS_OVERLAPPEDWINDOW, $WS_CAPTION, $WS_DLGFRAME), 0, WinGetHandle(AutoItWinGetTitle())) GUISetState() ;Show GUI While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEndAlso note that if you use the Default keyword for the location coordinates, your GUI is automatically centred with no need to do any calculations. M23 Ā AnyĀ of myĀ own codeĀ posted anywhere on the forumĀ isĀ available for use by others without any restrictionĀ of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSortĀ ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- AĀ highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort,Ā edit and colourĀ ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Ā Link to comment Share on other sites More sharing options...
4ggr35510n Posted August 1, 2010 Author Share Posted August 1, 2010 (edited) Thanks guys soo much! ;*But I have two more questions ;]1 and 2:Child window doesn't appear in taskbar, but do appear in alt+tab dialog box - how should I create it to not appear there too? And:When I set Always-On-Top attribute to parent window, child window is also created with that attribute, same happens when I'm trying to delete this attribute from one, child/parent also looses it.Is there any way to set Always-On-Top atttribute to parent/child independently from parents/childs always-on-top attribute? 3:How can I create bitmap from file, that I could later append to menuitem? I found fuction _GDIPlus_BitmapCreateFromFile but handle that function returns doesn't work neither with _GUICtrlMenu_SetItemBmp or _GUICtrlMenu_SetItemBitmaps :/What should I do to make it work? Edited August 1, 2010 by 4ggr35510n Link to comment Share on other sites More sharing options...
doudou Posted August 1, 2010 Share Posted August 1, 2010 Child window doesn't appear in taskbar, but do appear in alt+tab dialog box - how should I create it to not appear there too? You may succeed if you play around with different window style bits. However, I don't think it is possible for windows other than WS_EX_TOOLwindow.When I set Always-On-Top attribute to parent window, child window is also created with that attribute, same happens when I'm trying to delete this attribute from one, child/parent also looses it.Is there any way to set Always-On-Top atttribute to parent/child independently from parents/childs always-on-top attribute? No. Child windows are ordered in the window hierarchy automatically on top of their parents.How can I create bitmap from file, that I could later append to menuitem? I found fuction _GDIPlus_BitmapCreateFromFile but handle that function returns doesn't work neither with _GUICtrlMenu_SetItemBmp or _GUICtrlMenu_SetItemBitmaps :/What should I do to make it work?_GDIPlus_BitmapCreateFromFile() returns GDI+ bitmap object, what you need is HBITMAP handle, so you'll have to apply _GDIPlus_BitmapCreateHBITMAPFromBitmap() on it (the bitmap object) before calling GDI or GUI functions. UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ Link to comment Share on other sites More sharing options...
4ggr35510n Posted August 2, 2010 Author Share Posted August 2, 2010 (edited) _GDIPlus_BitmapCreateFromFile() returns GDI+ bitmap object, what you need is HBITMAP handle, so you'll have to apply _GDIPlus_BitmapCreateHBITMAPFromBitmap() on it (the bitmap object) before calling GDI or GUI functions.Gr8, works, thank you! but...by default those icons are really small... Is there any way to enlarge them? Edited August 2, 2010 by 4ggr35510n Link to comment Share on other sites More sharing options...
doudou Posted August 2, 2010 Share Posted August 2, 2010 Gr8, works, thank you! Pleasure.by default those icons are really small... Is there any way to enlarge them?Everything displayed in a menu item is limited by its height (which is controlled globally by Windows visual styles), customizing it further will require owner-drawn menu. It is a bit to complex to construct an example from scratch, for the moment I can only suggest searching the forum and the Web for "menu owner draw". UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ 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