Re: Win32 page flipping
- Posted by cgibin at bellsouth.net Jan 14, 2003
- 599 views
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - ----- Original Message ----- From: <Patrick.Barnes at transgrid.com.au> 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? Hello, Several options to choose from here. 1) use CS_OWNDC when you create your MainWindow or 2) Create a/or more CompatibleDC's (memory device context) [example] global function CreateCompatibleDC(atom hdc) return c_func(xCreateCompatibleDC, {hdc}) end function hdc = GetDC(hwnd) memdc = CreateCompatibleDC(hdc) -- make sure we destroy this when we exit the prog if iMsg = WM_PAINT then -- BitBlt the memdc to the hdc BitBlt(hdc, 0, 0,601,455,memdc,0,0,SRCCOPY) Its alittle more complex than this simple message so I would suggest downloading some of euman's examples or if you prefer to use win32lib I could send you an pretty neat graphical demo that got Jordah started. Regards, [not really] Unknown -----BEGIN PGP SIGNATURE----- Version: PGP Personal Privacy 6.5.8 iQA/AwUBPiONpqfIAe6g4MxnEQLaJwCePx3Cbvl+Mb7PQKvwJxG64BWQjysAoMJ0 a68vujwkGhvq57SYUzBriykc =Omyi -----END PGP SIGNATURE-----