handle eines Mainwindows ermitteln per API?

Für allgemeine Fragen zur Programmierung mit PureBasic.
Benutzeravatar
nicolaus
Moderator
Beiträge: 1175
Registriert: 11.09.2004 13:09
Kontaktdaten:

handle eines Mainwindows ermitteln per API?

Beitrag 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
Unimatrix Zero
Beiträge: 48
Registriert: 13.10.2004 23:47

Beitrag 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 =>
Benutzeravatar
nicolaus
Moderator
Beiträge: 1175
Registriert: 11.09.2004 13:09
Kontaktdaten:

Beitrag von nicolaus »

Danke dir. DIe API habe ich doch (PSDK) ich bin einfach nich auf den befehl gekommen das war mein prob. :)
Antworten