Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. A stupid Win32 UI question - mouse tracking

A stupid Win32 UI question - mouse tracking

Scheduled Pinned Locked Moved C / C++ / MFC
questiondesignhelptutoriallearning
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    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.

    L J P 3 Replies Last reply
    0
    • A Anonymous

      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.

      L Offline
      L Offline
      l a u r e n
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • A Anonymous

        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.

        J Offline
        J Offline
        Jay Beckert
        wrote on last edited by
        #3

        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.:)

        A 1 Reply Last reply
        0
        • A Anonymous

          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.

          P Offline
          P Offline
          Peter Occil
          wrote on last edited by
          #4

          There is an article in MSJ regarding this. Peter O.

          1 Reply Last reply
          0
          • J Jay Beckert

            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.:)

            A Offline
            A Offline
            Anonymous
            wrote on last edited by
            #5

            thank you

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups