LRESULT WM_PRINTCLIENT(int /*long*/ wParam, int /*long*/ lParam) { LRESULT result = super.WM_PRINTCLIENT(wParam, lParam); if (OS.COMCTL32_MAJOR < 6) { RECT rect = new RECT(); OS.GetClientRect(handle, rect); GCData data = new GCData(); data.device = display; data.foreground = getForegroundPixel(); GC gc = GC.win32_new(wParam, data); drawWidget(gc, rect); gc.dispose(); } return result; }
LRESULT WM_PAINT(int /*long*/ wParam, int /*long*/ lParam) { if (OS.COMCTL32_MAJOR >= 6) { return super.WM_PAINT(wParam, lParam); } PAINTSTRUCT ps = new PAINTSTRUCT(); GCData data = new GCData(); data.ps = ps; data.hwnd = handle; GC gc = new_GC(data); if (gc != null) { int width = ps.right - ps.left; int height = ps.bottom - ps.top; if (width != 0 && height != 0) { RECT rect = new RECT(); OS.SetRect(rect, ps.left, ps.top, ps.right, ps.bottom); drawWidget(gc, rect); } gc.dispose(); } return LRESULT.ZERO; }