如何更改 MFC 的高度(或宽度)
CRect
似乎没有直接设置(计算的)高度(
int CRect::Width()
目前我找到的方法是重新计算底部:
// Create a 40 x 40 rectangle CRect myRect(10, 10, 50, 50); // Set the Height to 80 myRect.bottom = myRect.top + 80;
使用
myRect.InflateRect(0, 0, 0, 80)