1. win32lib question - David Cuny
- Posted by Judith Evans <camping at FLASH.NET> Sep 08, 1999
- 352 views
David, sorry to ask a question that has been answered a number of times, BUT..... How can I get the mouse x,y of areas outside the client area? I tried doing a captureMouse(MainWindow) but the system just hung with the wait cursor and I had to ctrl-alt-delete out. I must be misusing the captureMouse. I put it in a onMouse event=MOUSE_MOVE loop and then releaseMouse at end of the loop. What I'm aiming for is to put little rectangles with text under the toolbar that tells me what the glyph "stands for." Thanks, Judith
2. Re: win32lib question - David Cuny
- Posted by david cuny <dcuny at LANSET.COM> Sep 08, 1999
- 340 views
Judith wondered: > What I'm aiming for is to put little rectangles with text under > the toolbar that tells me what the glyph "stands for." I'm in the middle of coding tooltips right now. I've got the structures working, but they aren't responding. I'm not sure if I have to route events to the tooltip structure, or what. It's a lot of work to get some of these common controls working, and I'm really not sure it's worth the effort - it may be easier to emulate the controls, since I've already subclassed all the controls. You shouldn't do a modal grab to get the mouse - this would cause too many other side effects. The better way to emulate it would be to add some code in the subclassed() loop, along with a timer. If the mouse has been sitting over a control for a certain amount of time, pop up the tooltip. It is removed by the mouse moving, a button being pressed, etc. In any event, I hope to have tooltips for all controls working in a few days - hopefully, without emulation. -- David Cuny
3. Re: win32lib question - David Cuny
- Posted by Judith Evans <camping at FLASH.NET> Sep 08, 1999
- 319 views
Thanks David, However, even with the captureMouse removed from the program the best I can do is to trap y=34, which is the lowest value for y I can get and it is right under the toolbar. If I place the mouse over the toolbar, onMouse doesn't recognise it. Is that because the Toolbar sits over a portion of the client area but is not accessable except to click? Anyway, I have it working by drawing a little rectangle and depending upon the value of x, putting in some text. As you would say, "not very elegant." If you are addressing this I will just sit back and wait for it to be in Win23lib. As to my original question. IS there a way to get the mouse coordinates outside of the client area? thanks again, Judith
4. Re: win32lib question - David Cuny
- Posted by "Cuny, David" <David.Cuny at DSS.CA.GOV> Sep 08, 1999
- 332 views
Judith wrote: > If I place the mouse over the toolbar, onMouse doesn't > recognise it. Bother. But the controls *in* the toolbar should still respond to the mouse event. That's the important part, since you want the tooltip to appear when the mouse goes over the tool (button, combo, whatever), and not the toolbar itself. > As to my original question. IS there a way to get the mouse > coordinates outside of the client area? There are two ways I can think of doing it. The first is to convince Windows to keep sending your program events, even when it's not in the client area. Doing a modal grab works, but it has nasty side effects. The second is to set up a timer in your window, and poll Windows to find out where the mouse currently is. I suspect that approach is a resource hog. But I'm not Windows guru. Any other suggestions? -- David Cuny
5. Re: win32lib question - David Cuny
- Posted by Judith Evans <camping at FLASH.NET> Sep 08, 1999
- 327 views
This is the last beating I'm giving this old horse. But the mouse doesn't recognise anything placed in the toolbar. Also in the status bar. Unless I have some subtle error. I'm doing onMouse[Mainwin]= blahblah and in that routine I have only if event=MOUSEMOVE. I trap x,y to new variable names and force an onPaint. the onPaint routine wPuts the x,y coordinates so I can see that only mouse movements outside of the toolbar and status bar give me a value. I was just curious about mouse outside of client area. I don't presently have a need for it. Judith
6. Re: win32lib question - David Cuny
- Posted by "Cuny, David" <David.Cuny at DSS.CA.GOV> Sep 08, 1999
- 326 views
Judith Evans wrote: > But the mouse doesn't recognise anything placed > in the toolbar. Also in the status bar. The toolbar is a window. I haven't tested this, but try doing an onMouse[theToolbar] instead. -- David Cuny
7. Re: win32lib question - David Cuny
- Posted by Judith Evans <camping at FLASH.NET> Sep 08, 1999
- 331 views
David: try onMouse[thetoolbar] instead Tried it. No luck. Anyway, I've taken up enough of your time....... Thanks, Judith