Hooch Posted October 23, 2004 Posted October 23, 2004 (edited) EDITED FOR CLARITY When I use this code I get a window that is 70px wide. GUICreate("myProg", 70, 354, 200, 200) GUISetState(@SW_SHOW) while 1 = 1 Wend However when I use this code or any varient of styles I get a window twice the width $WS_CAPTION = 0x00C00000 $WS_EX_TOPMOST = 0x00000008 $style = BitOr($WS_CAPTION,$WS_EX_TOPMOST) GUICreate ( "myProg", 70, 354, 200 , 200 , $style) GUISetState(@SW_SHOW) while 1 = 1 Wend Edited October 23, 2004 by Hooch
SlimShady Posted October 23, 2004 Posted October 23, 2004 (edited) The topmost style is an extended style and should be placed last. eg: $WS_CAPTION = 0x00C00000 $WS_EX_TOPMOST = 0x00000008 GUICreate ( "myProg", 70, 354, 200 , 200, $WS_CAPTION, $WS_EX_TOPMOST) GUISetState(@SW_SHOW) while 1 = 1 Wend Edited October 23, 2004 by SlimShady
Developers Jos Posted October 23, 2004 Developers Posted October 23, 2004 EDITED FOR CLARITYWhen I use this code I get a window that is 70px wide.GUICreate("myProg", 70, 354, 200, 200) GUISetState(@SW_SHOW) while 1 = 1 WendHowever when I use this code or any varient of styles I get a window twice the width $WS_CAPTION = 0x00C00000 $WS_EX_TOPMOST = 0x00000008 $style = BitOr($WS_CAPTION,$WS_EX_TOPMOST) GUICreate ( "myProg", 70, 354, 200 , 200 , $style) GUISetState(@SW_SHOW) while 1 = 1 Wend<{POST_SNAPBACK}>Your previous post was correct you only used the Hex values..You have now BitOr-ed the Style and ExStyle together... ( like SlimShady mentiones in his post)I had a quick look if there is a minimum window size for the WS_CAPTION style but couldn't find any .. maybe others know ?? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Hooch Posted October 23, 2004 Author Posted October 23, 2004 I usually just use the numbers anyway but even the code that Slim posted the width of the resulting window is still far more than the 70px it is supposed to be. Remove the styles and the window is at the correct width.
Hooch Posted October 23, 2004 Author Posted October 23, 2004 Ok, here is some code, when you run it the button should be the same width as the window. For me it is not. GUICreate ( "myProg", 70, 354, 200 , 200, 0x00C00000, 0x00000008) GUISetState(@SW_SHOW) $GUI_CLOSE = GUICtrlCreateButton("Close", 0, 331, 70, 22) while 1 = 1 $MSG = GUIGetMsg() Select Case $MSG = $GUI_CLOSE EndSelect Wend
Holger Posted October 23, 2004 Posted October 23, 2004 @Hooch: that is normal You have a window with a caption AND a 'possible' maximize/minimize-box-placeholder... Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
Developers Jos Posted October 23, 2004 Developers Posted October 23, 2004 this does work: #Include <GUIConstants.au3> GUICreate("myProg", 70, 354, 200, 200, BitOr($WS_CAPTION,$WS_POPUP), $WS_EX_TOPMOST) GUISetState(@SW_SHOW) $GUI_CLOSE = GUICtrlCreateButton("Close", 0, 331, 70, 22) While 1 = 1 $MSG = GUIGetMsg() Select Case $MSG = $GUI_CLOSE exit EndSelect Wend SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Hooch Posted October 23, 2004 Author Posted October 23, 2004 @Hooch: that is normal You have a window with a caption AND a 'possible' maximize/minimize-box-placeholder...<{POST_SNAPBACK}>Oh ok well that is different behavior than 102 which is to be expected. What I am trying for is a window that has no min/max or close buttons on the title bar, just the Title text and still only be 70px wide.0x00C00000 is the only style I saw that gave that type of a title bar.
Developers Jos Posted October 23, 2004 Developers Posted October 23, 2004 Oh ok well that is different behavior than 102 which is to be expected. What I am trying for is a window that has no min/max or close buttons on the title bar, just the Title text and still only be 70px wide.0x00C00000 is the only style I saw that gave that type of a title bar.<{POST_SNAPBACK}>Check the post just above this one... you migth have missed it.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Hooch Posted October 23, 2004 Author Posted October 23, 2004 Check the post just above this one... you migth have missed it.... <{POST_SNAPBACK}>Ahhh nice, great thanks for the assist.
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