0

m_PICTURE_OD 是一个 IDC_STATIC,

m_PICTURE_OD.MoveWindow(640 /*x*/,96/*y*/,480/*w*/,288/*h*/);
RECT myrect;
m_PICTURE_OD.GetClientRect(&myrect);

myrect.bottom = 288; myrect.top = 0; myrect.left = 0; myrect.right = 480;

RECT myrect;
m_PICTURE_OD.GetWindowRect(&myrect);

myrect.bottom = 508; myrect.top = 220; myrect.left = 802; myrect.right = 1282;

我想重新获得 myrect.left = 640, myrect.top = 96 ...

我能做些什么 ?

谢谢,

4

1 回答 1

1

您正在混合屏幕坐标和客户端坐标。要在它们之间进行翻译,请使用CWnd::ScreenToClientand CWnd::ClientToScreen

于 2011-04-08T09:54:10.990 回答