Re: Win32 page flipping
- Posted by jordah at btopenworld.com Jan 14, 2003
- 478 views
Hi patrick, with win32lib, create a pixmap which is definately a compatible bitmap. draw everything on it using wPuts..etc then use bitblt() or copyblt(). if you're interested in speed/flicker free, then use API calls as opposed to win32lib calls. if you need the sequence of routines then. 1) create a compatible DC of window u want to use. using CreateCompatibleDC(). remember to delete this using DeleteDC 2) Create a memory bitmap using CreateCompatibleBitmap 3) Select the bitmap into the CompatibleDC. make sure u save the value returned by SelectObject because u'll need to select it back into the DC before you delete the compatible bitmap using DeleteObject 4)Use PatBlt() to fill the bitmap(selected in DC) using specified raster operations. this is faster than using a filled rectangle because it does a sorta of bit block transfer. 6) Write the Text using either DrawText or TextOut 7) do all necessary stuff then use bitblt() to transfer the bitmap to destination DC. then clean up. Sorry, maybe i have over-emphasised and u alreadyu know this but who knows. Maybe someone out there has learnt some tips. Jordah ----- Original Message ----- From: <Patrick.Barnes at transgrid.com.au> To: "EUforum" <EUforum at topica.com> Sent: Tuesday, January 14, 2003 3:00 AM Subject: Win32 page flipping > > I have several pages of graphics and text (wPuts'ed) that I wish to switch between without flickering. How do I draw graphics and text into a bitmap, so that I can blit it on to the screen in one go? > ======================= > Patrick Barnes > Information Systems Group > 201 Elizabeth St, Sydney > Patrick.Barnes at transgrid.com.au > Ext: 91-3583 > Ph:(02) 9284-3583 > Mob: 0410 751 044 > > > *********************************************************************** > > > *********************************************************************** > > > > TOPICA - Start your own email discussion group. FREE! >