2011-04-07 115 views
0

m_PICTURE_OD之后是IDC_STATIC,MFC GetClientRect/GetWindowRect一个的MoveWindow

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;

我想reobtain myrect.left = 640,myrect.top = 96 ...

我能做些什么?

感谢,

回答

1

你混合的屏幕坐标和工作区坐标。要翻译它们,请使用CWnd::ScreenToClientCWnd::ClientToScreen