Seite 1 von 1
Gegenstück zu SetWindowPos?!
Verfasst: 20.02.2005 20:26
von Leo
Moin,
ich suche nach einer Funktion, die das Gegenteil von SetWindowPos_() macht, nämlich informationen über das Fenster liefert.
So, oder so ähnlich.
Danke.
P.S.: Ich brauche nur das hwndInsertAfter aus der Struktur, um festzustellen, ob das Fenster ein Stay-On-Top Fenster ist. Gibt es da vielleicht ne andere Lösung für?
Verfasst: 20.02.2005 20:58
von ts-soft
Verfasst: 20.02.2005 21:04
von MVXA
hab ich ihm schon über skype vorgeschlagen

. Er will die Z Position des Fensters.
Verfasst: 20.02.2005 21:20
von Leo
ts-soft hat geschrieben:
falls du dieses meinst
Siehe P.S.
Ich brache nur das hwndInsertAfter
Verfasst: 21.02.2005 12:58
von AndyMars
Ich würde GetTopWindow vorschlagen...
Verfasst: 23.02.2005 21:04
von Leo
Hmm nein, das is nich ganz das, was ich suche ^^ Das gibt mir ja nur Parents zurück.. ich will einfach nur wissen ob bei einem Fenster das Flag AlwaysOnTop gesetz is ^^
Verfasst: 23.02.2005 23:56
von NicTheQuick
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
Verfasst: 24.02.2005 13:56
von Leo
Hey cool, thx, scheint zu funktionieren
