Home > Software engineering >  MFC controls screen coordinates is negative, please explain
MFC controls screen coordinates is negative, please explain

Time:05-23


Use MFC statements take control coordinate
Statement is
The RECT r2;
: : GetWindowRect (h2, & amp; R2);

As a result, found a lot of negative, left top screen is 1920 * 1080, but there are two computer screen

As follows:
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1 control calculation -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
R1=left=16, top=21, righ=993, bottom=762
R2=left=1630, top=843, righ=1900, bottom=893


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 2 control calculation -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
R1=left=16, top=21, righ=993, bottom=762
R2=left=- 858993460, top=- 858993460, righ=- 858993460, bottom=- 858993460


thank you
  • Related