Add the WM_RBUTTONUP Case

You need to add a WM_RBUTTONUP case to display the current bitmap by using the BitBlt function. Add the following statements to your window function:

case WM_RBUTTONUP: /* message: right mouse button released */

hDC = GetDC(hWnd);

BitBlt(hDC, LOWORD(lParam), HIWORD(lParam),

Bitmap.bmWidth, Bitmap.bmHeight,

hMemoryDC, 0, 0, SRCCOPY);

ReleaseDC(hWnd, hDC);

break;