J
Joe Johnston
If there is actually a framework answer to this I am all
ears...
I have the window handle I am getting the consts from my
c++ header winuser.h. No matter what window I check I
_always_ get the following;
1 max true
2 min False
3 HasBorder False
4 titlebar False
I have included the declaration and the functions below.
Private Declare Function GetWindowLong Lib "user32"
Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex
As Long) As Long
Private Const WS_BORDER = &H800000
Private Const WS_CAPTION = &HC00000
Private Const WS_MAXIMIZEBOX = &H10000
Private Const WS_MINIMIZEBOX = &H20000
Private Const GWL_STYLE = (-16)
Friend Function HasMax(ByVal hwnd As Long) As
Boolean
Dim Style As Long
Style = GetWindowLong(hwnd, GWL_STYLE)
If ((Style And WS_MAXIMIZEBOX) = WS_MAXIMIZEBOX)
= True Then
HasMax = True
Else
HasMax = False
End If
End Function
Friend Function HasMin(ByVal hwnd As Long) As Boolean
Dim Style As Long
Style = GetWindowLong(hwnd, GWL_STYLE)
If ((Style And WS_MINIMIZEBOX) = WS_MINIMIZEBOX)
= True Then
HasMin = True
Else
HasMin = False
End If
End Function
Friend Function HasTitleBar(ByVal hwnd As Long) As
Boolean
Dim Style As Long
Style = GetWindowLong(hwnd, GWL_STYLE)
If ((Style And WS_DLGFRAME) = WS_DLGFRAME = True)
Then
HasTitleBar = True
Else
HasTitleBar = False
End If
End Function
Friend Function HasBorder(ByVal hwnd As Long) As
Boolean
Dim Style As Long
Style = GetWindowLong(hwnd, GWL_STYLE)
If ((Style And WS_BORDER) = WS_BORDER = True) Then
HasBorder = True
Else
HasBorder = False
End If
End Function
ears...
I have the window handle I am getting the consts from my
c++ header winuser.h. No matter what window I check I
_always_ get the following;
1 max true
2 min False
3 HasBorder False
4 titlebar False
I have included the declaration and the functions below.
Private Declare Function GetWindowLong Lib "user32"
Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex
As Long) As Long
Private Const WS_BORDER = &H800000
Private Const WS_CAPTION = &HC00000
Private Const WS_MAXIMIZEBOX = &H10000
Private Const WS_MINIMIZEBOX = &H20000
Private Const GWL_STYLE = (-16)
Friend Function HasMax(ByVal hwnd As Long) As
Boolean
Dim Style As Long
Style = GetWindowLong(hwnd, GWL_STYLE)
If ((Style And WS_MAXIMIZEBOX) = WS_MAXIMIZEBOX)
= True Then
HasMax = True
Else
HasMax = False
End If
End Function
Friend Function HasMin(ByVal hwnd As Long) As Boolean
Dim Style As Long
Style = GetWindowLong(hwnd, GWL_STYLE)
If ((Style And WS_MINIMIZEBOX) = WS_MINIMIZEBOX)
= True Then
HasMin = True
Else
HasMin = False
End If
End Function
Friend Function HasTitleBar(ByVal hwnd As Long) As
Boolean
Dim Style As Long
Style = GetWindowLong(hwnd, GWL_STYLE)
If ((Style And WS_DLGFRAME) = WS_DLGFRAME = True)
Then
HasTitleBar = True
Else
HasTitleBar = False
End If
End Function
Friend Function HasBorder(ByVal hwnd As Long) As
Boolean
Dim Style As Long
Style = GetWindowLong(hwnd, GWL_STYLE)
If ((Style And WS_BORDER) = WS_BORDER = True) Then
HasBorder = True
Else
HasBorder = False
End If
End Function