Is there a function available to identify the WindowState ie whether it is Normal OR Minimized OR Maximized.
I would also like to know whether we can set the window state to Normal, Minimized or Maximized programatically.
In VB this can be achieved using the following code
Code: Select all
If Me.WindowState = vbMaximized Then
Me.WindowState = vbNormal
Me.Height = "5000"
Me.Width = "5000"
End If
Code: Select all
ShowWindow( oWnd:hWnd, SW_NORMAL )
My intention is to restore the size and state of the window to its original size even if the user click on the maximize button on a MDICHILD window.
I tried the following code too, but did not work as expected
Code: Select all
#define GWL_STYLE -16
SetWindowLong(oWnd:hWnd, GWL_STYLE, nOr( GetWindowLong(oWnd:hWnd, GWL_STYLE), WS_MAXIMIZEBOX ))
Regards
Anser