Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Printing

From: rebol:techscribe at: 12-Sep-2003 13:16

Hi Gregg. Typically something like this: in the WndProc procedure LRESULT WndProc( ....) { static HENHMETAFILE hemf; HDC hdc, hdcemf; PAINTSTRUCT ps; RECT rect; switch(iMsg) case WM_CREATE : hdcEMF = CreateEnhMetaFile(NULL, NULL, NULL, NULL); .. ... ... hemf = CloseEnhMetaFile(hdcEMF); return 0; case WM_PAINT: hdc = BeginPaint(hwnd, &ps); GetClientRect(hwnd, &rect); ... PlayEnhMetaFile(hdc, hemf, &rect); EndPaitn(hwnd, &ps); return 0; See: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/metafile_81yd.asp and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/metafile_0whf.asp Hope this helps. Elan Gregg Irwin wrote: