win32_step_7 - 8BitsCoding/RobotMentor GitHub Wiki
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (uMsg == WM_DESTROY) PostQuitMessage(0);
else if (uMsg == WM_LBUTTONDOWN) {
// HDC h_screen_dc = ::GetDC(NULL);
HDC h_screen_dc = ::GetWindowDC(NULL);
HDC h_dc = GetDC(hWnd);
//BitBlt(h_dc, 0, 0, 300, 200, h_screen_dc, 0, 0, SRCCOPY);
BitBlt(h_dc, 0, 0, 300, 200, h_screen_dc, 0, 0, SRCINVERT; // μμλ°μ
ReleaseDC(hWnd, h_dc);
ReleaseDC(NULL, h_screen_dc);
}
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}