Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog Sticks together
#1
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
#2
In dialog function, insert case WM_WINDOWPOSCHANGED and place dialog2 moving code below.
#3
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
#4
Use function GetWinXY or GetWindowRect.
#5
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 Smile
#6
I figured out all i needed

Thanks so much Gintaras once again


Forum Jump:


Users browsing this thread: 1 Guest(s)