Relative Child Position?
-
Hi!
Wie bekommt man eigentlich die relative Position eines childwindows in einem Dialog? Also ab der client area des main dialogs.
Ich hab das jetzt so gemacht, aber geht das nicht einfacher (und ist das überhaupt richtig so)?case WM_PAINT: { RECT dialogWindow; GetWindowRect(dialogHandle, &dialogWindow); RECT childWindow; GetWindowRect(GetDlgItem(dialogHandle, IDC_CHECK1), &childWindow); int childX = childWindow.left - dialogWindow.left - GetSystemMetrics(SM_CXFRAME); int childY = childWindow.top - dialogWindow.top - GetSystemMetrics(SM_CYCAPTION) - GetSystemMetrics(SM_CYFIXEDFRAME); ...Danke schon mal!
-
GetWindowRect auf Child durchführen
ScreenToClient ausführen mit Handle des Parents.
-
Ach, so einfach!
Hatte die Funktion total vergessen.
Danke!