A stupid Win32 UI question - mouse tracking
-
I'm trying to create a dialog window, that becomes opaque when a mouse hovers over it and when the mouse leaves the window, it should become transparent again. My problem here is that when a mouse is over a control in the dialog window, it doesn't work the way I want - the dialog does not recognize that the mouse is hovering over it. What should I do? And my second question is: Do you have any how to do the same UI as in Real Player One. I mean: when a mouse is moved over the display window three zoom buttons appear. I actually would like to do it a little bit more different: when I move the mouse over the upper-left corner of the client area of a window the buttons should appear. I'm doing Win32 programming in my spare time for a few months now and I'm nothing but a beginner yet. Sorry if my questions are too stupid. Regards, Z.
-
I'm trying to create a dialog window, that becomes opaque when a mouse hovers over it and when the mouse leaves the window, it should become transparent again. My problem here is that when a mouse is over a control in the dialog window, it doesn't work the way I want - the dialog does not recognize that the mouse is hovering over it. What should I do? And my second question is: Do you have any how to do the same UI as in Real Player One. I mean: when a mouse is moved over the display window three zoom buttons appear. I actually would like to do it a little bit more different: when I move the mouse over the upper-left corner of the client area of a window the buttons should appear. I'm doing Win32 programming in my spare time for a few months now and I'm nothing but a beginner yet. Sorry if my questions are too stupid. Regards, Z.
check out the SetCapture() and ReleaseCapture() stuff the second point i would solve by putting a static control on the dialog box and make it invisible but use it to capture the mouse and do your button / control thing there
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away"
sonork: 100.18128 8028finder.com -
I'm trying to create a dialog window, that becomes opaque when a mouse hovers over it and when the mouse leaves the window, it should become transparent again. My problem here is that when a mouse is over a control in the dialog window, it doesn't work the way I want - the dialog does not recognize that the mouse is hovering over it. What should I do? And my second question is: Do you have any how to do the same UI as in Real Player One. I mean: when a mouse is moved over the display window three zoom buttons appear. I actually would like to do it a little bit more different: when I move the mouse over the upper-left corner of the client area of a window the buttons should appear. I'm doing Win32 programming in my spare time for a few months now and I'm nothing but a beginner yet. Sorry if my questions are too stupid. Regards, Z.
Anonymous wrote: I'm trying to create a dialog window, that becomes opaque when a mouse hovers over it and when the mouse leaves the window, it should become transparent again. My problem here is that when a mouse is over a control in the dialog window, it doesn't work the way I want - the dialog does not recognize that the mouse is hovering over it. What should I do? You should check for the mouse hover in the controls also. Derive a class fromm your controls and override the mouse events you need to. Anonymous wrote: I actually would like to do it a little bit more different: when I move the mouse over the upper-left corner of the client area of a window the buttons should appear. Define a rectangle with in your view in the upper-left corner of the client area and use that rectangle to test if the mouse is over it and act accordingly. Off the top of my head I can't remember the mouse event, on mouse move? Use the point you get to see if that point is in your rectangle and if so, draw your controls.:)
-
I'm trying to create a dialog window, that becomes opaque when a mouse hovers over it and when the mouse leaves the window, it should become transparent again. My problem here is that when a mouse is over a control in the dialog window, it doesn't work the way I want - the dialog does not recognize that the mouse is hovering over it. What should I do? And my second question is: Do you have any how to do the same UI as in Real Player One. I mean: when a mouse is moved over the display window three zoom buttons appear. I actually would like to do it a little bit more different: when I move the mouse over the upper-left corner of the client area of a window the buttons should appear. I'm doing Win32 programming in my spare time for a few months now and I'm nothing but a beginner yet. Sorry if my questions are too stupid. Regards, Z.
There is an article in MSJ regarding this. Peter O.
-
Anonymous wrote: I'm trying to create a dialog window, that becomes opaque when a mouse hovers over it and when the mouse leaves the window, it should become transparent again. My problem here is that when a mouse is over a control in the dialog window, it doesn't work the way I want - the dialog does not recognize that the mouse is hovering over it. What should I do? You should check for the mouse hover in the controls also. Derive a class fromm your controls and override the mouse events you need to. Anonymous wrote: I actually would like to do it a little bit more different: when I move the mouse over the upper-left corner of the client area of a window the buttons should appear. Define a rectangle with in your view in the upper-left corner of the client area and use that rectangle to test if the mouse is over it and act accordingly. Off the top of my head I can't remember the mouse event, on mouse move? Use the point you get to see if that point is in your rectangle and if so, draw your controls.:)