【发布时间】:2013-06-03 23:51:11
【问题描述】:
RECT rec;
::GetClientRect(hWnd, &rec);
int windowWidth = rec.right - rec.left, windowHeight = rec.bottom - rec.top;
::printToDebugWindow(windowWidth,windowHeight); //prints 2 numbers
MoveWindow(hWnd,100,100,windowWidth,windowHeight,FALSE);
问题是 windowWidth 和 windowHeight 出于某种原因正在改变。 MoveWindow 似乎正在改变窗口尺寸。并且将 repaint 设置为 TRUE 不会改变任何事情。
输出:
x:560,y:178
x: 544, y: 140
x: 528, y: 102
x: 512, y: 64
x:496,y:26
为什么每次迭代都会改变尺寸?
我也试过了:没有变化
int windowWidth = rec.right, windowHeight = rec.bottom;
【问题讨论】: