Blair Mahaffy
May 5th, 1999, 10:04 AM
I'm a bit confused at the apparent inconsistency between GetWindowRect and MoveWindow (or SetWindowPos) in VC5
I'm using a Static as a "placeholder" for creating a dialog within a dialog but when I do a GetWindowRect of the Static I get SCREEN coordinates and when I do MoveWindow for the dialog it expects coordinates relative to the dialog.
So what's the correct approach -- do I also have to get the dialog's Rect? Am I missing a function somewhere that returns numbers compatible with MoveWindow? Or am I taking entirely the wrong approach and is there an easier way to tell the child dialog where to position itself relative to the parent dialog?
If anyone cares to hazard an explanation -- I'm curious why this inconsistency exists. It seems odd to use two different coordinate systems when getting or setting.
Thanks!
I'm using a Static as a "placeholder" for creating a dialog within a dialog but when I do a GetWindowRect of the Static I get SCREEN coordinates and when I do MoveWindow for the dialog it expects coordinates relative to the dialog.
So what's the correct approach -- do I also have to get the dialog's Rect? Am I missing a function somewhere that returns numbers compatible with MoveWindow? Or am I taking entirely the wrong approach and is there an easier way to tell the child dialog where to position itself relative to the parent dialog?
If anyone cares to hazard an explanation -- I'm curious why this inconsistency exists. It seems odd to use two different coordinate systems when getting or setting.
Thanks!