Re: ? re: Win32lib an onClick (+fan mail)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Brian,

Oh!  So THAT'S why no one else suggested it! <cha-grin>

As a rank dilettante, I've been under the vague impression that WinMain
processed all the events specified in a program in a loop that stole slices
of processor time from the rest of the executing program to check on all the
events, so that no matter what else was happening in a program, any event
would be trapped relatively "quickly".  I thought that was the basic idea
about programming in relation to "events", that whenever an event occurred,
it could be noticed & therefore responded to.

Dan


Brian wrote:

>From past experience... I think the problem with that solution is that your
>button click does not get processed until you finish the loop that displays
>your bitmaps.  (I think that was the original problem that started this
>thread.)  When your loop finishes, then your button gets processed, but
>then it's too late.  That's why a timer is required... it gives you the
>break required to process that button click.

In response to my suggestion:


>>Hi Sherm,
>>
>>I guess there must be some reason this won't work, or someone would have
>>suggested it, but here's what I would have tried:
>>
>>Make an integer variable to serve as a true/false flag,
>>("Flag_StopDisplay"), & initialize it to 0; make a procedure to respond to
>>the "stop" button click event that sets the flag to 1; put a test for that
>>flag in your while loop, with "exit" if the flag = 1 (with reset the flag
>to
>>0 before the exit command).
>>
>>I guess it wouldn't stop your BMP display in the middle of putting up a
>>specific picture, but I would think it would stop at the beginning or end
>of
>>one, and they're small enough that that might be serviceable??

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu