 |
Das deutsche QBasic- und FreeBASIC-Forum Für euch erreichbar unter qb-forum.de, fb-forum.de und freebasic-forum.de!
|
Vorheriges Thema anzeigen :: Nächstes Thema anzeigen |
Autor |
Nachricht |
Cherry
Anmeldungsdatum: 20.06.2007 Beiträge: 249
|
Verfasst am: 17.02.2008, 19:46 Titel: von einem bestimmten prozess erzeugte fenster finden |
|
|
frage: wie kann das HWND eines Fensters bestimmen, von dem ich nur den Namen der Fensterklasse weiß und welcher Prozess es erzeugt hat (PID hab ich)? |
|
Nach oben |
|
 |
raph ael
Anmeldungsdatum: 12.04.2006 Beiträge: 472
|
Verfasst am: 17.02.2008, 20:33 Titel: |
|
|
EnumWindows hat Folgendes geschrieben: |
Declare Function EnumWindows Lib "user32.dll" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
· lpEnumFunc
Points to an application-defined callback function. For more information, see the EnumWindowsProc callback function.
· lParam
Specifies a 32-bit, application-defined value to be passed to the callback function.
|
[url=http://msdn2.microsoft.com/en-us/library/ms633498(VS.85).aspx]EnumWindowProc[/url]
(PHPBB will das nicht als Link erkennen, manuell in die Adresszeile kopieren)
Müsste sich nach FB konventieren lassen. Wenn man untergeordnete Fenster will, verwendet man
GetWindow hat Folgendes geschrieben: |
· hWnd
Identifies a window. The window handle retrieved is relative to this window, based on the value of the uCmd parameter.
· uCmd
Specifies the relationship between the specified window and the window whose handle is to be retrieved. This parameter can be one of the following values:
GW_CHILD
The retrieved handle identifies the child window at the top of the Z order, if the specified window is a parent window; otherwise, the retrieved handle is NULL. The function examines only child windows of the specified window. It does not examine descendant windows.
GW_HWNDFIRST
The retrieved handle identifies the window of the same type that is highest in the Z order. If the specified window is a topmost window, the handle identifies the topmost window that is highest in the Z order. If the specified window is a top-level window, the handle identifies the top-level window that is highest in the Z order. If the specified window is a child window, the handle identifies the sibling window that is highest in the Z order.
GW_HWNDLAST
The retrieved handle identifies the window of the same type that is lowest in the Z order. If the specified window is a topmost window, the handle identifies the topmost window that is lowest in the Z order. If the specified window is a top-level window, the handle identifies the top-level window that is lowest in the Z order. If the specified window is a child window, the handle identifies the sibling window that is lowest in the Z order.
GW_HWNDNEXT
The retrieved handle identifies the window below the specified window in the Z order. If the specified window is a topmost window, the handle identifies the topmost window below the specified window. If the specified window is a top-level window, the handle identifies the top-level window below the specified window. If the specified window is a child window, the handle identifies the sibling window below the specified window.
GW_HWNDPREV
The retrieved handle identifies the window above the specified window in the Z order. If the specified window is a topmost window, the handle identifies the topmost window above the specified window. If the specified window is a top-level window, the handle identifies the top-level window above the specified window. If the specified window is a child window, the handle identifies the sibling window above the specified window.
GW_OWNER
The retrieved handle identifies the specified window’s owner window, if any.
|
btw:
Die MSDN ist mal wieder wirklich langsam  _________________
Zitat: | 1000 Yottabytes sind absurd. 640 Yottabytes sollten genug für jeden sein. |
|
|
Nach oben |
|
 |
Stormy

Anmeldungsdatum: 10.09.2004 Beiträge: 567 Wohnort: Sachsen - wo die schönen Frauen wachsen ;)
|
|
Nach oben |
|
 |
Heiko
Anmeldungsdatum: 28.07.2008 Beiträge: 101
|
Verfasst am: 18.10.2008, 03:17 Titel: |
|
|
könnte mir das jemand eventuell auch erklären?
also ich hab vor ein fenster, welches von mir selbst durch eine dll geöffnet wird.
nur weiß ich nicht, wie man das wieder schliessen kann.
hab schon mit getactivewindow und destroywindow herumgespielt, funktioniert aber irgendwie noch nicht ganz.
also habe beide funktionen aus der user32 verfügbar.
aber wie kann ich das geöffnete fenster dann bei bedarf auch schliessen?
bin in FB sozusagen totaler neuling, im großen ganzen auch nicht so schwer, aber bei dem code, den ich so probiere ist es echt mühseelig jedesmal mit dem taskmanager das fenster zu schliessen. |
|
Nach oben |
|
 |
|
|
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen.
|
|