RE: Win32lib (simple app) not working
- Posted by Matt Lewis <matthewwalkerlewis at yahoo.com> Aug 18, 2003
- 392 views
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