@Override LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) { LRESULT result = super.WM_PRINTCLIENT (wParam, lParam); if (result != null) return result; /* * Feature in Windows. For some reason, when WM_PRINT is used * to capture an image of a hierarchy that contains a tree with * columns, the clipping that is used to stop the first column * from drawing on top of subsequent columns stops the first * column and the tree lines from drawing. This does not happen * during WM_PAINT. The fix is to draw without clipping and * then draw the rest of the columns on top. Since the drawing * is happening in WM_PRINTCLIENT, the redrawing is not visible. */ printClient = true; int /*long*/ code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam); printClient = false; return new LRESULT (code); }
@Override LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) { LRESULT result = super.WM_PRINTCLIENT (wParam, lParam); if (result != null) return result; /* * Feature in Windows. In version 6.00 of COMCTL32.DLL, * when WM_PRINTCLIENT is sent from a child BS_GROUP * control to a parent BS_GROUP, the parent BS_GROUP * clears the font from the HDC. Normally, group boxes * in Windows do not have children so this behavior is * undefined. When the parent of a BS_GROUP is not a * BS_GROUP, there is no problem. The fix is to save * and restore the current font. */ if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) { int nSavedDC = OS.SaveDC (wParam); int /*long*/ code = callWindowProc (handle, OS.WM_PRINTCLIENT, wParam, lParam); OS.RestoreDC (wParam, nSavedDC); return new LRESULT (code); } return result; }
@Override LRESULT WM_PRINTCLIENT (int /*long*/ wParam, int /*long*/ lParam) { LRESULT result = super.WM_PRINTCLIENT (wParam, lParam); 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; }