WM_NCLBUTTONUP 메시지에서 DC로 출력할 수 없나요?
글쓴이: mydream / 작성시간: 금, 2016/10/14 - 6:03오후
TCHAR nclbuffer[1024];
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) {
switch(message) {
//이상 코드생략....
case WM_NCLBUTTONUP:
{
RECT winRect;
GetWindowRect(hwnd, &winRect);
HRGN winRgn=CreateRectRgn(winRect.left, winRect.top, winRect.right, winRect.bottom);
HDC mainHdc=GetDCEx(hwnd, winRgn, DCX_WINDOW | DCX_INTERSECTRGN);
_stprintf(nclbuffer, _T("%s WM_NCLBUTTONUP"), nclbuffer);
TextOut(mainHdc, 10, 5, nclbuffer, _tcslen(nclbuffer));
ReleaseDC(hwnd, mainHdc);
}
return 0;
//이하 코드생략....
}
return DefWindowProc(hwnd, message, wparam, lparam);
}WM_NCLBUTTONUP에서 텍스트가 디바이스 컨텍스트로 출력이 되지 않습니다. 어떻게 해야 출력할 수 있는지 궁금합니다.
Forums:


region
GetClientRect()을 사용하세요
댓글 달기