david's daily developer note

전역 마우스 좌표에서 특정 윈도우상의 좌표 변환 본문

[Develop] Native/Native

전역 마우스 좌표에서 특정 윈도우상의 좌표 변환

mouse-david 2012. 2. 29. 14:00
728x90
//전역 윈도우 좌표 
POINT gPt;

//상태바 위치: 
CRect statusRect; 
this->GetWindowRect(statusRect);

CPoint newPt;
newPt.x =  gPt.x - statusRect.left;
newPt.y =  gPt.y - statusRect.top;

 // Tip 최상위 윈도우 위치 및, 부모 윈도우 위치 가져오기
CRect windowPos;
AfxGetMainWnd() -> GetWindowRect( &windowPos );

this->GetParentFrame()->GetWindowRect( windowPos );

 

728x90

'[Develop] Native > Native' 카테고리의 다른 글

툴바 배경을 투명하게 만드는 방법  (0) 2012.03.05
주요 클래스간 참조 방법  (0) 2012.03.05
GetAsyncKeyState  (0) 2012.02.28
윈도우 최소, 최대 크기 제한  (0) 2012.02.27
CAtlMap Examples  (0) 2012.02.20