RE: Win32lib (simple app) not working
- Posted by euman at bellsouth.net Aug 18, 2003
- 394 views
On 18 Aug 2003 at 12:57, Matt Lewis wrote: > > > 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 Thats strange but seems to work.... ( Im not asking why that was implemented this way) Now on to figuring out the scrolling of my virtual window, hopefully it will Paint properly....I'll post it so you all can add it to the Win32lib demo's. Euman