hey

all im trying to do is display a whole bunch of lines inside the client area of the window...like so:

abc
abc
abc
.
.
.



now when i launch the program, i see those lines, but theres sumthing strange going on...if i minimize the window and then maximize it, only 12 of those lines turn up in the client area, i dunno what happens to all the other lines!!

here is the code for the window procedure, u can see the full source code at:
http://members.aol.com/anotherway83/win32.txt


;cnt, byt and ypos are global variables
;cnt is the count, originally set to 80,
;byt is tmHeight+tmExternalLeading
;ypos is the position at which to display the string


WndProc proc hnd:DWORD,ms:DWORD,wpar:WPARAM,lpar:LPARAM
LOCAL ps:PAINTSTRUCT
LOCAL hdc:HDC
LOCAL tm:TEXTMETRIC

.IF ms==WM_CREATE
invoke BeginPaint,hnd,addr ps
mov hdc,eax
invoke GetTextMetrics,hdc,addr tm
push tm.tmHeight
pop byt
mov eax,tm.tmExternalLeading
add byt,eax
invoke EndPaint,hnd,addr ps
xor eax,eax
ret
.ELSEIF ms==WM_PAINT
invoke BeginPaint,hnd,addr ps
mov hdc,eax
.WHILE cnt!=0
invoke TextOut,hdc,0,ypos,addr mystr,3
mov eax,byt
add ypos,eax
dec cnt
.ENDW
mov cnt,80
mov ypos,0
invoke EndPaint,hnd,addr ps
xor eax,eax
ret

.ELSEIF ms==WM_DESTROY
invoke PostQuitMessage,NULL
xor eax,eax
ret
.ENDIF

def:
invoke DefWindowProc,hnd,ms,wpar,lpar
ret
WndProc endp
Posted on 2003-04-16 18:52:10 by AnotherWay83
Of course,
the initial value in variable cnt is 12..


.........
.........
mov hWnd,eax
invoke ShowWindow,eax,SW_MAXIMIZE
invoke UpdateWindow,hWnd
invoke SetScrollRange,hWnd,SB_VERT,0,79,TRUE

[B]mov cnt,12[/B]

MESS_LOOP:

Regards,
Lingo
Posted on 2003-04-16 19:31:01 by lingo12
LOL...i cant believe i missed that line completely...i'll go hide behind a bush now, until everybody forgets this post :D
Posted on 2003-04-16 20:01:22 by AnotherWay83