Re: SaveDC failure
- Posted by Derek Parnell <ddparnell at bigpond.com> Feb 22, 2006
- 414 views
Rad wrote: > > Hi, > > I am trying to use a PrintPreview dll (written in C++) to invoke a > print preview window. > > This dll creates it's own Hdc in the initialization function. > > I am trying to write to this Hdc using funtions from GRPRINT.ew, > when the SaveDC fails in EzCreateFont routine. > > When does a SaveDC fail......?? I don't know. However you might try this to help work it out... Before you do a setFont() call using your hDC, try this atom err err = saveDC(hDC) if err = 0 then err = w32Func(xGetLastError,{}) wDebug({w32DebugLog,"log.txt"}) wDebug( sprintf("Err = %d", err)) wDebug({w32DebugLog,""}) end if Then checkout the result with http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/system_error_codes.asp to find a matching error code. -- Derek Parnell Melbourne, Australia Skype name: derek.j.parnell