in his source code he has a DrawWindow proc that supose to draw into the backbuffer. if you notice he only has button controls in his app and the rest of the visual stuff such as the text and boxes, he just draws them directly to the main window. now it appears straight forward on how he's drawing everything to the backbuffer. for instance he uses the DrawFrameControl for the buttons which works well because thats what its designed for but what if i have a listview. how would i draw the listview?
Posted on 2002-05-15 19:44:09 by smurf
ok here is another method im trying to use a backbuffer. im trying to use eion's and thomas's suggestion on how to use a backbuffer but im not sure if i understood them. here is the thread ive been trying to study: http://www.asmcommunity.net/board/index.php?topic=2558&highlight=backbuffer. does anyone see what i maybe doing wrong here?

here is the code i have:
.ELSEIF uMsg == WM_CREATE

invoke GetClientRect,hWnd,addr ScreenRect
invoke CreateCompatibleDC,0
mov dc1,eax
mov eax,ScreenRect.right
sub eax,ScreenRect.left
mov ebx,ScreenRect.bottom
mov ebx,ScreenRect.top
invoke CreateBitmap,eax,ebx,1,32,0
mov hbmp,eax
invoke SelectObject, dc1, eax

.ELSEIF uMsg == WM_PAINT
invoke BeginPaint,hWnd,addr ps
mov dc2,eax
mov eax,ScreenRect.right
sub eax,ScreenRect.left
mov ebx,ScreenRect.bottom
mov ebx,ScreenRect.top
invoke BitBlt,dc2,0,0,eax,ebx,dc,0,0,SRCCOPY
invoke EndPaint,hWnd,addr ps
mov eax,1
ret
Posted on 2002-05-15 21:56:08 by smurf
Yup ;), one maybe, and a couple of for sures ;)

.ELSEIF uMsg == WM_CREATE

invoke GetClientRect,hWnd,addr ScreenRect
[b]invoke GetDC, hWnd
mov dc0, eax[/b]
invoke CreateCompatibleDC,[b]eax[/b] ; This is the Maybe ??
mov dc1,eax
mov eax,ScreenRect.right
sub eax,ScreenRect.left
mov ebx,ScreenRect.bottom
[b]sub[/b] ebx,ScreenRect.top
[b];invoke CreateBitmap,eax,ebx,1,32,0[/b]
[b]invoke CreateCompatibleBitmap, dc0, eax, ebx[/b]
mov hbmp,eax
[b]invoke DeleteDC, hWnd, dc0[/b]
invoke SelectObject, dc1, [b]hbmp[/b]
[b]mov SaveOldBM, eax[/b]

.ELSEIF uMsg == WM_PAINT
invoke BeginPaint,hWnd,addr ps
mov dc2,eax
mov eax,ScreenRect.right
sub eax,ScreenRect.left
mov ebx,ScreenRect.bottom
[b]sub[/b] ebx,ScreenRect.top
invoke BitBlt,dc2,0,0,eax,ebx,dc,0,0,SRCCOPY
invoke EndPaint,hWnd,addr ps
mov eax,1
ret


Enjoy ;)
:NaN:
Posted on 2002-05-15 22:09:14 by NaN
So, how about getting standard controls drawn to the backbuffer
instead of the screen DC? Is there an easier way than subclassing,
and hacking up structure to have the backbuffer DC instead of the
screen DC?
Posted on 2002-05-16 06:37:18 by f0dder