2011-04-07 114 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