Seite 1 von 1

handle eines Mainwindows ermitteln per API?

Verfasst: 18.11.2004 02:13
von nicolaus
Hi

Mal wieder ne frage und zwar wie kann ich per API das handle eines Mainwindows ermitteln wenn ich in diesem window per API ein childwindow erstellt habe?

Danke euch schon mal.

MfG Nico

Verfasst: 18.11.2004 04:22
von Unimatrix Zero
@ Nico

Sollte mit der GetParent Funktion gehen.
Hier ein Auszug aus der WinAPI Hilfe:

The GetParent function retrieves the handle of the specified child window's parent window.

HWND GetParent(

HWND hWnd // handle of child window
);


Parameters

hWnd

Identifies the window whose parent window handle is to be retrieved.



Return Values

If the function succeeds, the return value is the handle of the parent window. If the window has no parent window, the return value is NULL.

Kann man sich hier runterladen und dann ins PB Hilfe Verzeichnis kopieren
http://www.purebasic.de/files/winapi.exe
http://www.purebasic.de/files/win32.zip

cya

Unimatrix Zero

<= Die Welt um mich herum ist in mir =>

Verfasst: 18.11.2004 08:10
von nicolaus
Danke dir. DIe API habe ich doch (PSDK) ich bin einfach nich auf den befehl gekommen das war mein prob. :)