WildByDesign Posted April 6 Posted April 6 I'm trying to determine what is the best and most reliable way to determine if a window is resizable or not. I would think that I could check the GUIStyles to see what is applied. But there are many of them and sometimes it is a combination of several of them that makes a window resizable or not. I am not very good yet with BitAND and BitOR which is likely needed for that check on styles. I don't want to make a mistake and miss some combination of styles. Aside from checking styles, is there any other way? Such as checking for availability of Minimize/Restore window button control? This is needed for the GUIDarkTheme UDF. This check would be made after GUI creation and all controls, but right prior to GUISetState. So the GUI window will not be visible at the time of the check. Thank you.
Solution ioa747 Posted April 6 Solution Posted April 6 The most reliable way to determine if a window is resizable by the operating system is to check if it has the WS_SIZEBOX (also known as WS_THICKFRAME) style. Func _GUI_IsResizable($hWnd) Local $iStyle = _WinAPI_GetWindowLong($hWnd, $GWL_STYLE) ; Check if the WS_SIZEBOX (0x00040000) bit is set ; $WS_SIZEBOX and $WS_THICKFRAME are the same constant If BitAND($iStyle, $WS_SIZEBOX) Then Return True Else Return False EndIf EndFunc ;==>_GUI_IsResizable WildByDesign and spudw2k 1 1 I know that I know nothing
WildByDesign Posted April 6 Author Posted April 6 4 hours ago, ioa747 said: The most reliable way to determine if a window is resizable by the operating system is to check if it has the WS_SIZEBOX (also known as WS_THICKFRAME) style. This is perfect. Thank you so much. ioa747 1
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