Created
November 28, 2012 13:38
-
-
Save tuttlem/4161348 to your computer and use it in GitHub Desktop.
FlipBackBuffer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FlipBackBuffer PROC hWin:DWORD | |
LOCAL hDC:HDC | |
LOCAL ps:PAINTSTRUCT | |
; start painting the window | |
invoke BeginPaint, hWin, ADDR ps | |
mov hDC, eax | |
; work out the dimensions to blit | |
mov eax, clientRect.right | |
sub eax, clientRect.left | |
mov ebx, clientRect.bottom | |
sub ebx, clientRect.top | |
; write the memory buffer to the front buffer | |
invoke BitBlt, hDC, 0, 0, eax, ebx, memDC, 0, 0, SRCCOPY | |
; we're done | |
invoke EndPaint, hWin, ADDR ps | |
xor eax, eax | |
ret | |
FlipBackBuffer ENDP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment