RE: Win32lib (simple app) not working

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

From: euman at bellsouth.net [mailto:euman at bellsouth.net]

> The code (below) should work with Win32lib 59.1 shouldn't it?
> I basically made a mirror of an API program that works as an 
> example for someone who uses Win32lib. 
> (less a couple hundred lines ofcourse) 
> 
> Im uncertain as to why I would "HAVE" to create a Win32lib Pixmap
> to do the very same thing Im trying to accomplish here...
> (this way would be tons faster than the standard pixmap.)
> 
> 

You don't.  However, win32lib already calls BeginPaint.  
You just need to call getDC() and it will work:

-- onPaint_MainWin
procedure onPaint_MainWin( integer self, integer event, sequence parms )


--   hdc = w32Func( xBeginPaint, { getHandle(MainWin), ps } )        
   hdc = getDC( self )
   if not w32Func( xBitBlt, {hdc, 0, 0, vxScreen, vyScreen, memdc, 0, 0,
SRCCOPY} ) then end if     
--   w32Proc( xEndPaint, { getHandle(MainWin), ps } )    


end procedure


Matt Lewis

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

Search



Quick Links

User menu

Not signed in.

Misc Menu