Loop über alle Controls eines Dialogs
-
Hallo,
ich möchte gerne eine Methode schreiben, die über alle Handles (oder CWnd's) aller Controls eines angegebenen Dialog loopt.
Schema:
...
Control = GetControl(this); while (Control!=NULL) { Control = GetNextControl(Control) ... }
Das das in VB (ja ich weiß das das nicht C++ ist) möglich ist sieht man hier: http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21113672.html
es gibt da eine Funktion namens "CWnd GetNextDlgGroupItem(CWnd)", bei der ich mir aber nicht wirklich sicher bin ob es das ist was ich suche, bzw wie man ihn richtig anwendet.
char buf[200]; CWnd *cw = this; while (cw!=NULL) { ZeroMemory(buf,200); cw->GetWindowText(buf,100); cw = GetNextDlgGroupItem(cw); };
Hoffe auf Hilfe.
Vielen Dankmfg
Three.dee
-
GetWindow(GW_CHILD), GetWindow(GW_HWNDNEXT)
sowohl als Win32 API Funktion, als auch CWnd member.
-
Super!
besten Dank, funktioniert wunderbar!mfg
Three.dee