Ich weiß nicht, ob es das ist, was du meinst, aber mein Programm
EnumAllWindows liefert dir zu einem Handle auch ein Flag, ob ein Window
topmost.
Zum Beispiel ist die Taskbar
topmost. Hier der Code, der das herausfindet.
Code: Alles auswählen
Procedure.s dwExStyle(DWord.l)
#WS_EX_COMPOSITED = $02000000
#WS_EX_LAYERED = $80000
#WS_EX_LAYOUTRTL = $400000
#WS_EX_NOACTIVATE = $8000000
#WS_EX_NOINHERITLAYOUT = $100000
Text.s = ""
If DWord & #WS_EX_ACCEPTFILES
Text = Text + "accept drag-drop files, "
EndIf
If DWord & #WS_EX_APPWINDOW
Text = Text + "taskbar window, "
EndIf
If DWord & #WS_EX_CLIENTEDGE
Text = Text + "sunken edge border, "
EndIf
If DWord & #WS_EX_COMPOSITED
Text = Text + "#WS_EX_COMPOSITED, "
EndIf
If DWord & #WS_EX_CONTEXTHELP
Text = Text + "question mark button, "
EndIf
If DWord & #WS_EX_CONTROLPARENT
Text = Text + "#WS_EX_CONTROLPARENT, "
EndIf
If DWord & #WS_EX_DLGMODALFRAME
Text = Text + "double border, "
EndIf
If DWord & #WS_EX_LAYERED
Text = Text + "layred, "
EndIf
If DWord & #WS_EX_LAYOUTRTL
Text = Text + "Arabic/Hebrew, "
EndIf
If DWord & #WS_EX_LEFT
Text = Text + "left-aligned, "
EndIf
If DWord & #WS_EX_LEFTSCROLLBAR
Text = Text + "left scroll bar, "
EndIf
If DWord & #WS_EX_LTRREADING
Text = Text + "left-to-right reading, "
EndIf
If DWord & #WS_EX_MDICHILD
Text = Text + "MDI child, "
EndIf
If DWord & #WS_EX_NOACTIVATE
Text = Text + "#WS_EX_NOACTIVATE, "
EndIf
If DWord & #WS_EX_NOINHERITLAYOUT
Text = Text + "#WS_EX_NOINHERITLAYOUT, "
EndIf
If DWord & #WS_EX_NOPARENTNOTIFY
Text = Text + "no #WS_PARENTNOTIFY message, "
EndIf
If DWord & #WS_EX_OVERLAPPEDWINDOW
Text = Text + ""
EndIf
If DWord & #WS_EX_PALETTEWINDOW
Text = Text + ""
EndIf
If DWord & #WS_EX_RIGHT
Text = Text + "right-aligned, "
EndIf
If DWord & #WS_EX_RIGHTSCROLLBAR
Text = Text + "right scroll bar, "
EndIf
If DWord & #WS_EX_RTLREADING
Text = Text + "right-to-left reading, "
EndIf
If DWord & #WS_EX_STATICEDGE
Text = Text + "3D border, "
EndIf
If DWord & #WS_EX_TOOLWINDOW
Text = Text + "tool window, "
EndIf
If DWord & #WS_EX_TOPMOST
Text = Text + "topmost, "
EndIf
If DWord & #WS_EX_TRANSPARENT
Text = Text + "transparent, "
EndIf
If DWord & #WS_EX_WINDOWEDGE
Text = Text + "raised edge, "
EndIf
If Text
Text = Left(Text, Len(Text) - 2)
Else
Text = "n/a"
EndIf
ProcedureReturn Text
EndProcedure
Structure WINDOWINFO
cbsize.l
rcWindow.RECT
rcClient.RECT
dwStyle.l
dwExStyle.l
dwWindowStatus.l
cxWindowBorders.l
cyWindowBorders.l
AtomWindowType.l
wCreatorVersion.w
EndStructure
handle = FindWindow_("Shell_TrayWnd", 0)
If handle
WindowInfo.WINDOWINFO
WindowInfo\cbsize = SizeOf(WINDOWINFO)
If GetWindowInfo_(handle, @WindowInfo)
MessageRequester("Ex Style", dwExStyle(WindowInfo\dwExStyle))
EndIf
EndIf