我创建了一个SDI MFC项目,我试图让它在移动窗口时刷新窗口的坐标...
这是我到目前为止所拥有的:
// TODO: add draw code for native data here
RECT rect;
GetClientRect(&rect);
// Get window coordinates
int left = rect.left;
int right = rect.right;
int bottom = rect.bottom;
int top = rect.top;
// Print them out
CString l;
l.Format(L"%d", left);
pDC->TextOutW(0, 100, L"Left: " + l, _tcslen(l)+6);
CString r;
r.Format(L"%d", right);
pDC->TextOutW(0, 130, L"Right: " + r, _tcslen(r)+7);
CString b;
b.Format(L"%d", bottom);
pDC->TextOutW(0, 160, L"Bottom: " + b, _tcslen(b)+8);
CString t;
t.Format(L"%d", top);
pDC->TextOutW(0, 190, L"Top: " + t, _tcslen(t)+5);
如何实现onMove()函数,以便在每次移动/调整窗口大小时使用新值刷新这些值?