Sunaj Posted August 15, 2007 Share Posted August 15, 2007 Tried a variety of ideas but nothing seems to work :/ Here's the latest code bit: $gaGUIMenu=GUICtrlCreateMenuItem($gaMem,$ghMTFMenu) GUICtrlSetFont(gaGUIMenu,9,"","","Courier New") Also tried setting the gui font (GUISetFont) with no luck: the context menu opens with exact same standard font anyway. Any help is appreciated, searched the forum high and low to no avail. [list=1][*]Generic way to detect full path to default browser, List/ListView Events Using GuiRegisterMsg (detect doubleclick and much more)[*]Using dllcall for full control over fileopendialog, Make DirMove act somewhat normally (by circumventing it...)[*]Avoid problems with "&" (chr(38)) in code, Change desktop maximized area/workspace (fx to make deskbar type app)[*]Change focus behavior when buttons are clicked to work closer to 'standard windows' app[*](Context) Menus With Timed Tooltips, Fast Loops & Operators in AU3[*]Clipboard UDF, A clipboard change notification udf[/list] Link to comment Share on other sites More sharing options...
martin Posted August 15, 2007 Share Posted August 15, 2007 Tried a variety of ideas but nothing seems to work :/ Here's the latest code bit: $gaGUIMenu=GUICtrlCreateMenuItem($gaMem,$ghMTFMenu) GUICtrlSetFont(gaGUIMenu,9,"","","Courier New") Also tried setting the gui font (GUISetFont) with no luck: the context menu opens with exact same standard font anyway. Any help is appreciated, searched the forum high and low to no avail. The only way I've found to change the menu font is with Desktop Properties|Appearance|Advanced|Item - menu. This changes all menus of course, and it looks to me like there is only one setting windows uses for all menus. (I now expect the next post to prove me wrong.) Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Holger Posted August 15, 2007 Share Posted August 15, 2007 Fonts for menu/items can only be 'changed' by creating 'ownerdrawn' menu items (as I use them in my GUI/Tray-menus):http://msdn2.microsoft.com/en-us/library/ms647558.aspx Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
Sunaj Posted August 16, 2007 Author Share Posted August 16, 2007 @martin, cheers for the feedback, guess it's a bit unfortunate to change all menu's on the whole system.. still thanks, I never noticed that sub-sub-sub setting before @Holger, thanks for the MSDN link,that settles it. I already use your menu lib for this purpose but wanted a light weight alternative for a new application I'm developing.Fonts for menu/items can only be 'changed' by creating 'ownerdrawn' menu items (as I use them in my GUI/Tray-menus):http://msdn2.microsoft.com/en-us/library/ms647558.aspxThe only way I've found to change the menu font is with Desktop Properties|Appearance|Advanced|Item - menu. This changes all menus of course, and it looks to me like there is only one setting windows uses for all menus. (I now expect the next post to prove me wrong.) [list=1][*]Generic way to detect full path to default browser, List/ListView Events Using GuiRegisterMsg (detect doubleclick and much more)[*]Using dllcall for full control over fileopendialog, Make DirMove act somewhat normally (by circumventing it...)[*]Avoid problems with "&" (chr(38)) in code, Change desktop maximized area/workspace (fx to make deskbar type app)[*]Change focus behavior when buttons are clicked to work closer to 'standard windows' app[*](Context) Menus With Timed Tooltips, Fast Loops & Operators in AU3[*]Clipboard UDF, A clipboard change notification udf[/list] Link to comment Share on other sites More sharing options...
ValeryVal Posted August 16, 2007 Share Posted August 16, 2007 But you can open OWN window with lines as context menu. Right click ($GUI_EVENT_SECONDARYDOWN) will open second window by call ContextMenu() #include <GuiConstants.au3> $NewStyle = False $hWnd = GuiCreate("Gui Style", 260, 100) $Style = GUICtrlCreateButton("Set Style",45, 50, 150, 20 ) GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case -3 Exit Case $GUI_EVENT_SECONDARYDOWN ContextMenu() Case Else EndSwitch WEnd func ContextMenu() ;Opt('MouseCoordMode',0) local $MPos = MouseGetPos() GUICreate("", 100, 100, $MPos[0],$MPos[1],$WS_POPUPWINDOW+$WS_THICKFRAME) GUISetState () While 1 $Msg = GUIGetMsg() Switch $Msg Case -3 Exit Case $GUI_EVENT_SECONDARYDOWN Case Else EndSwitch WEnd endfunc This secondary window (context menu) can have text lines (any fonts), icons, pictures, animation and other controls for selection... Valery The point of world view Link to comment Share on other sites More sharing options...
ValeryVal Posted August 16, 2007 Share Posted August 16, 2007 delete or comment waste line $Style = GUICtrlCreateButton("Set Style",45, 50, 150, 20 ) The point of world view Link to comment Share on other sites More sharing options...
Sunaj Posted August 16, 2007 Author Share Posted August 16, 2007 Great point Valery! But damn, it's gonna take some smoothass GUI engineering to get a completely custom, updateable, context meny to draw, question is whether the resource use at the end of the day would be much different from using the custom drawn GUI menu by Holger?! Sunaj But you can open OWN window with lines as context menu. Right click ($GUI_EVENT_SECONDARYDOWN) will open second window by call ContextMenu() [.........] This secondary window (context menu) can have text lines (any fonts), icons, pictures, animation and other controls for selection... Valery [list=1][*]Generic way to detect full path to default browser, List/ListView Events Using GuiRegisterMsg (detect doubleclick and much more)[*]Using dllcall for full control over fileopendialog, Make DirMove act somewhat normally (by circumventing it...)[*]Avoid problems with "&" (chr(38)) in code, Change desktop maximized area/workspace (fx to make deskbar type app)[*]Change focus behavior when buttons are clicked to work closer to 'standard windows' app[*](Context) Menus With Timed Tooltips, Fast Loops & Operators in AU3[*]Clipboard UDF, A clipboard change notification udf[/list] 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