case WM_DRAWITEM:
{
LPDRAWITEMSTRUCT lpDis = (LPDRAWITEMSTRUCT)lParam;
if (lpDis->CtlID == IDC_STATIC1)
{
HDC hdcMem = CreateCompatibleDC(lpDis->hDC);
HBITMAP hbmp = CreateCompatibleBitmap(lpDis->hDC, lpDis->rcItem.right - lpDis->rcItem.left, lpDis->rcItem.bottom - lpDis->rcItem.top);
SelectObject(hdcMem, hbmp);
HPEN hpen = CreatePen(PS_SOLID, 1, COL_848400);
SelectObject(hdcMem, hpen);
MoveToEx(hdcMem, 10, 10, NULL);
LineTo(hdcMem, 120, 120);
BitBlt(lpDis->hDC, lpDis->rcItem.left, lpDis->rcItem.top, lpDis->rcItem.right - lpDis->rcItem.left, lpDis->rcItem.bottom - lpDis->rcItem.top, hdcMem, 0, 0, SRCCOPY);
DeleteDC(hdcMem);
DeleteObject(hbmp);
DeleteObject(hpen);
}
}
break;
}