1. scroll bar display in win32lib 0.57.12/0.58.0

----=_g73u3vsmccnar4a1t00vkcbbm6qidj1pm1.MFSBCHJLHS

I have a problem with the following code.

Reproducing the problem is not easy, it is part timing, part [my] bad
program logic(!?!) :=3D(

Run the program, put the mouse cursor bottom right, and click and hold
for say between 0.2 and 0.9 second before releasing (probably depends
on your machines settings for double click events). Anyway, after four
or five tries, you should see the thumb decide to chase down to the
mouse pointer of its own accord (!). Once it gets there, click on the
thumb and the display goes a bit barmy.

=46or those of you not on topica, there are three small jpegs attached
showing the sort of display problems I am getting.

I really do need to call onEvents(0) inside the onpaint to either a)
abort immediately, which turned out not possible or b) loop and start
the display again, using a flag to make any re-entrant calls exit
immediately. (as discussed last November).

I did have a "paint in progress" flag, but it didn't help, anyway I've
cut this down to the bare bones to show the problem.


--=3D=3D code starts =3D=3D--
--
-- Demonstrate problem with scroll bars under win32lib 0.58
-- Problem existed in 0.57.12
--
include win32lib.ew

constant ppwin =3D create(Window,"Print
Preview",0,0,0,Default,Default,0)

constant size =3D getClientRect(ppwin)-20

constant PREVIEW =3D create(Pixmap,"",0,0,0,size[3],size[4],0)

procedure onOpen_ppwin(integer self, integer event, sequence params)
	setWindowScrollRange(ppwin, SB_VERT, 1, 10000, size[4])
	setWindowScrollRange(ppwin, SB_HORZ, 1, 8000, size[3])
	setPenColor(PREVIEW,BrightWhite)
	drawRectangle(PREVIEW,1,0,0,8000,10000)
			-- check for futher keydowns
			doEvents(0)
	copyBlt(ppwin, 10, 35, PREVIEW)
end procedure
setHandler(ppwin,{w32HPaint,w32HResize},routine_id("onOpen_ppwin"))

procedure scroll_Form(integer Self, integer Event, sequence Params)
	onOpen_ppwin(ppwin,w32HScroll,"")
end procedure
setHandler(ppwin, w32HScroll, routine_id("scroll_Form"))

WinMain(ppwin,Maximize)

----=_g73u3vsmccnar4a1t00vkcbbm6qidj1pm1.MFSBCHJLHS
Content-Type: image/jpeg; name=scroll1.jpg

new topic     » topic index » view message » categorize

2. Re: scroll bar display in win32lib 0.57.12/0.58.0

On Tue, 04 Feb 2003 00:44:32 +0000, Pete Lomax <petelomax at blueyonder.co.uk> 
wrote:

>
> I have a problem with the following code.
>
[snip]
Seems to be working fine (win32lib v0.58 and Win2000) for me.


-- 

cheers,
Derek Parnell

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu