c++ - How can I make a proccess in an OnLButtonDown() event happen again and again untill I live the button? -
what happen until this:
any line happens once, , if use awhile(1)
or while (nflags == mk_lbutton)
working should crash.
the other problem, or maybe same 1 delay if able it, maybe using while()
timer()
?
i thinking timer()
recall function delay can't call onlbuttondown()
because asi understand message can call arguments.
in onlbuttondown()
call settimer()
start timer running, eg. every 100ms. add onlbuttonup()
, call killtimer()
stop timer running. then, code in ontimer()
function (add wm_timer
message map) , run while mouse held down.
note if user clicks , drags mouse outside window, onlbuttondown()
called not onlbuttonup()
can leave program thinking mouse button stuck down. functions deal are: call setcapture()
@ same time settimer()
, releasecapture()
@ same time killtimer()
keep receiving mouse messages no matter mouse is. i'd advise looking functions i've mentioned in answer on msdn , reading on them more information.
Comments
Post a Comment