Button location
-
How to get the location of a button placed in a dialog box designed with resouce editor? i tried with mybutton->GetWindowRect() and mybutton->GetClientRect(). but both does n't give the location of the button. :sigh:
-
How to get the location of a button placed in a dialog box designed with resouce editor? i tried with mybutton->GetWindowRect() and mybutton->GetClientRect(). but both does n't give the location of the button. :sigh:
in what way it does not give the position of the button ?
CRect rect mybutton->GetWindowRect(rect);
will give the pixel rectangle of the button relative to its parent window.CRect rect mybutton->GetClientRect(rect);
will give the pixel rectangle of the client region of the button. remember that the positions and sizes in the resource editor ARE NOT PIXELS.
Maximilien Lincourt Your Head A Splode - Strong Bad