Re: SaveDC failure

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu