Re: Win32Lib: Mouse Down Event for Window
- Posted by "Greg Haberek" <ghaberek at wowway.com> May 14, 2004
- 445 views
-- this is a pretty simple demo of how to do -- something with the mouse button down -- please note that doPaintBrush() is some routine -- that paints the current brush to the Window -- or performs some other drawing task integer isDown isDown = False procedure DrawHandler( integer self, integer event, sequence params ) atom iMsg integer x, y, shift iMsg = params[1] x = params[2] y = params[3] shift = params[4] if iMsg = LeftDown then -- could also be RightDown isDown = True -- start painting doPaintBrush() -- do initial paint elsif iMsg = LeftUp then -- could also be RightUp isDown = False -- stop painting elsif iMsg = MouseMove and isDown = True then -- painting? doPaintBrush() -- paint the window end if end procedure setHandler( MyWin, w32HMouse, routine_id("DrawHandler") )
----- Original Message ----- From: "cklester" <guest at RapidEuphoria.com> To: <EUforum at topica.com> Sent: Thursday, May 13, 2004 10:50 PM Subject: Re: Win32Lib: Mouse Down Event for Window > > > posted by: cklester <cklester at yahoo.com> > > Greg Haberek wrote: > > > > I think the word we may be looking for here is "fill" as in color only an > > certain area given specific boundaries. > > No, I want to be able to click on a bitmap, > and where I click the program "paints" according > to whatever "brush" I've selected. Then, when > I drag my mouse all over, the program continues > to paint the same "brush" pattern... until I release > the mouse and am no longer "painting." > > Now, who can show me some of that? :) > > > >