Lets say I have a dialog box with a button on it. What I'm trying to do is change the buttons position and/or size, relative to its previous position and size.
I use [b]GetWindowRect()[/b] to retrieve the [b]RECT[/b] of the button. I guess the unit I get is pixels. Then I use [b]GetDialogBaseUnits()[/b] and convert from pixels to dialog untis as stated in the [b]Win32 Programmer's Reference[/b] under [b]GetDialogBaseUnits()[/b]. Finally I use [b]MoveWindow[/b] to move and/or resize the button.
Here is where I have trouble. When I try to "move" it to the same position as it allready is (set in the resource file), it should stay in place, but it moves around. What am I doing wrong?
Sorry, I'm not exactly the king when it comes to explaining stuff. :-)
0 · ·