1. RE: Win32 page flipping
- Posted by Patrick.Barnes at transgrid.com.au Jan 14, 2003
- 520 views
Great, that should be what I need. Yes, you're right; there are no controls in the window - just written directly. Actually, I will just use a single v. large sized bitmap, and use stretchBlt to transfer it, because the text sizes don't seem to scale well. Thanks. ============================================== _______<-------------------\__ / _____<--------------------__|=== | |_ <-------------------/ \__| Patrick Barnes -----Original Message----- From: Pete Lomax [mailto:petelomax at blueyonder.co.uk] Sent: Tuesday, 14 January 2003 14:45 To: EUforum Subject: Re: Win32 page flipping On Tue, 14 Jan 2003 14:00:43 +1100, Patrick.Barnes at transgrid.com.au wrote: > >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? Flickering? Do you use repaintWindow() alot? I found I reduced alot of flicker with surrounding toolbars, buttons, border etc which did not need updating by invoking my oppaint routine directly. Otherwise: I assume you already have code which writes direct to the window, so use something like this: size = getClientRect(win) -- returns {x1,y1,x2,y2} size[3]-=size[1] size[4]-=size[2] If Bitmap=0 then --[**1**] Bitmap=create(Pixmap,"",0,0,0,size[3],size[4],0) end if setCtlSize(Bitmap,size[3],size[4]) then setFont/setPenColor/drawRectangle/drawLine/bitBlt/stretchBlt/ setTextColor/wPuts as usual, only to your Bitmap, then just: copyBlt(win, 0, 0, Bitmap) Pete [**1**] I create my bitmap precisely once, maximum size since I open the window maximised, and resized it before each repaint. ==^^=============================================================== This email was sent to: Patrick.Barnes at transgrid.com.au TOPICA - Start your own email discussion group. FREE! *********************************************************************** ***********************************************************************
2. RE: Win32 page flipping
- Posted by Phil Russell <pg_russell at lineone.net> Jan 14, 2003
- 477 views
Hi Patrick, Another source of flicker that I have found is the automatic background erase that windows performs prior to WM_PAINT being issued. You can prevent this by returning 1 to the WM_ERASEBKGND message for the window you are blitting to. There is also a good article on flicker-free drawing at: http://freespace.virgin.net/james.brown7/tuts/flicker.htm HTH, Phil Patrick.Barnes at transgrid.com.au wrote: > 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 > > > *********************************************************************** > > > *********************************************************************** > >
3. RE: Win32 page flipping
- Posted by Patrick.Barnes at transgrid.com.au Jan 14, 2003
- 483 views
How do you do that? Is that a win32lib thing, or an api thing? -----Original Message----- From: Phil Russell [mailto:pg_russell at lineone.net] Subject: RE: Win32 page flipping Hi Patrick, Another source of flicker that I have found is the automatic background erase that windows performs prior to WM_PAINT being issued. You can prevent this by returning 1 to the WM_ERASEBKGND message for the window you are blitting to. There is also a good article on flicker-free drawing at: http://freespace.virgin.net/james.brown7/tuts/flicker.htm HTH, Phil Patrick.Barnes at transgrid.com.au wrote: > 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! *********************************************************************** ***********************************************************************