Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't keep button centered on window size change
#4
Code:
Copy      Help
,case WM_INITDIALOG
,SendMessage hDlg WM_SIZE 0 0
,
,case WM_SIZE
,int c=id(3 hDlg)
,RECT rd rc
,GetClientRect hDlg &rd
,GetClientRect c &rc
,mov rd.right/2-(rc.right/2) rd.bottom/2-(rc.bottom/2) c
I've been trying to use this code you gave me to move other buttons around in my dialog, I'm having the same problem as before with my other buttons. I have 8 large buttons, 4 on top and 4 on bottom. If I play with the code I can get some of the buttons where I want them but on others (especially the right side of the screen), no matter what I do I cannot figure out how to move them to the right locations. Can you maybe break down this code and explain how I might be able to change it to move buttons around in my dialog? Or is there another code I should be using.

Thanks


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)