Posts: 86
Threads: 27
Joined: Jan 2008
I have been trying to make it where i have a main dialog
when i push a button in the main dialog a sub dialog opens up in a spot relating to the main dialog
for example exactly above the main dialog
and when i move the main dialog the sub dialog follows it
Any help is very appreciated
Thanks very much
Posts: 12,073
Threads: 140
Joined: Dec 2002
In dialog function, insert case WM_WINDOWPOSCHANGED and place dialog2 moving code below.
Posts: 86
Threads: 27
Joined: Jan 2008
Ok i get what you are saying
But im not fully understanding it
in the main dialog i put WM_WINDOWPOSCHANGED
and then i put the moving for dialog 2
how do i set where i want dialog2 compared to the main dialog
i dont know how to get the coordinates of dialog 2 compared to dialog1
Thanks for your help
Posts: 12,073
Threads: 140
Joined: Dec 2002
Use function GetWinXY or GetWindowRect.
Posts: 86
Threads: 27
Joined: Jan 2008
That is the part i dont understand
I search in QM for that but nothing of use comes up
i think what im trying to do is get the XY of main dialog
then like add a certain amount of x and y to it depending where i want dialog2 and then make it move dialog 2 there
every time dialog1 is moved
Help on the XY part is greatly appreciated
Thanks so much
Posts: 86
Threads: 27
Joined: Jan 2008
I figured out all i needed
Thanks so much Gintaras once again