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. ATL / WTL / STL
  4. ATL: WM_MOUSELEAVE

ATL: WM_MOUSELEAVE

Scheduled Pinned Locked Moved ATL / WTL / STL
c++question
5 Posts 3 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.
  • S Offline
    S Offline
    Supriya Tonape
    wrote on last edited by
    #1

    hello On WM_MOUSELEAVE message the below function OnMouseLeave() is not getting called... (however OnInitDialog() is getting called) I have created a dialog box and wanted to call my function OnMouseLeave() on WM_MOUSELEAVE message. Declared a message map as below, BEGIN_MSG_MAP(CMyClass) MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) MESSAGE_HANDLER(WM_MOUSELEAVE, OnMouseLeave) END_MSG_MAP() any idea if am missing something ? Thanks and Regards, Supriya Tonape

    F 1 Reply Last reply
    0
    • S Supriya Tonape

      hello On WM_MOUSELEAVE message the below function OnMouseLeave() is not getting called... (however OnInitDialog() is getting called) I have created a dialog box and wanted to call my function OnMouseLeave() on WM_MOUSELEAVE message. Declared a message map as below, BEGIN_MSG_MAP(CMyClass) MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) MESSAGE_HANDLER(WM_MOUSELEAVE, OnMouseLeave) END_MSG_MAP() any idea if am missing something ? Thanks and Regards, Supriya Tonape

      F Offline
      F Offline
      Frank Seidler
      wrote on last edited by
      #2

      Hello, this is a MS design feature. You need to call TrackMouseEvent prior to receive a WM_MOUSELEAVE-Message. See: http://msdn.microsoft.com/en-us/library/ms645615%28VS.85%29.aspx for more info. Kind regards Frank

      S 1 Reply Last reply
      0
      • F Frank Seidler

        Hello, this is a MS design feature. You need to call TrackMouseEvent prior to receive a WM_MOUSELEAVE-Message. See: http://msdn.microsoft.com/en-us/library/ms645615%28VS.85%29.aspx for more info. Kind regards Frank

        S Offline
        S Offline
        Sauro Viti
        wrote on last edited by
        #3

        Just for completeness, the best place where you could put the TrackMouseEvent function, is inside the handler of the WM_MOUSEENTER message ;)

        S 1 Reply Last reply
        0
        • S Sauro Viti

          Just for completeness, the best place where you could put the TrackMouseEvent function, is inside the handler of the WM_MOUSEENTER message ;)

          S Offline
          S Offline
          Supriya Tonape
          wrote on last edited by
          #4

          Thank you. Yes I am using the trackmouseevent in OnMouseLeave() method.. actually i just replaced message as "WM_MOUSEMOVE" and it started working.. but thanks much for the help. Also I cud not find WM_MOUSEENTER message in respective .h file.. thanks and regards, Supriya Tonape

          S 1 Reply Last reply
          0
          • S Supriya Tonape

            Thank you. Yes I am using the trackmouseevent in OnMouseLeave() method.. actually i just replaced message as "WM_MOUSEMOVE" and it started working.. but thanks much for the help. Also I cud not find WM_MOUSEENTER message in respective .h file.. thanks and regards, Supriya Tonape

            S Offline
            S Offline
            Supriya Tonape
            wrote on last edited by
            #5

            also I used TME_LEAVE to check mouse actions in trackmouseevent structure initialization.. in case if somebody faces the prob as I had..

            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