hi,
how can i check if a window is a modal one or not. i tried out
GetWindowLong/GWL_STYLE with a bunch of styles that could fit
this criteria (WS_EX_TOPMOST,...) but it didn't worked...
i need something like: boolean IsModal(dword hwnd)
anybody knows how to do that?
how can i check if a window is a modal one or not. i tried out
GetWindowLong/GWL_STYLE with a bunch of styles that could fit
this criteria (WS_EX_TOPMOST,...) but it didn't worked...
i need something like: boolean IsModal(dword hwnd)
anybody knows how to do that?
Does this code snippet help (beware, VB :) )?
Public Function IsWindowModal(ByVal lngHwnd As Long) As Boolean
Dim rtn As Long
rtn = GetWindowLong(lngHwnd, GWL_EXSTYLE)
Debug.Print rtn
If rtn And &H40000 Then
IsWindowModal = False
Else
IsWindowModal = True
End If
End Function
mh are you sure? i get 500+ modal results and 5 non modal windows....
maybe the word "modal" is wrong... i mean these child windows where
you're not able to work with the main-app anymore (the "save as"
dialog is what i consider as "modal" for example)... i just need to check
this behaviour... is that possible?
maybe the word "modal" is wrong... i mean these child windows where
you're not able to work with the main-app anymore (the "save as"
dialog is what i consider as "modal" for example)... i just need to check
this behaviour... is that possible?
I think that that would be a task-modal window. Couldn't you just do a GetParent and if it returns non-null then it is task modal ?