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. Handling of WM_NCLBUTTONUP

Handling of WM_NCLBUTTONUP

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
4 Posts 2 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
    ss431
    wrote on last edited by
    #1

    hiiii, I want to handle WM_NCLBUTTONUP message in my doc/view application and I don't know how to use it.Please help me how to handle it? ss

    M 1 Reply Last reply
    0
    • S ss431

      hiiii, I want to handle WM_NCLBUTTONUP message in my doc/view application and I don't know how to use it.Please help me how to handle it? ss

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      The same way you handle any window messages (assuming you're using MFC doc/view)

      // Add to class
      afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point);

      // Add to message map
      ON_WM_NCLBUTTONUP()

      // Add implementation of handler method
      void CMyWndClass::OnNcLButtonUp(UINT nHitTest, CPoint point)
      {
         baseclass::OnNcLButtonUp(nHitTest, point);

      ... do stuff...
      }

      MArk

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      S 1 Reply Last reply
      0
      • M Mark Salsbery

        The same way you handle any window messages (assuming you're using MFC doc/view)

        // Add to class
        afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point);

        // Add to message map
        ON_WM_NCLBUTTONUP()

        // Add implementation of handler method
        void CMyWndClass::OnNcLButtonUp(UINT nHitTest, CPoint point)
        {
           baseclass::OnNcLButtonUp(nHitTest, point);

        ... do stuff...
        }

        MArk

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        S Offline
        S Offline
        ss431
        wrote on last edited by
        #3

        thanks for ur reply, sorry for my delay in giving this reply. I had done the same what you given in your reply. But i didn't get the result. WM_NCLBUTTONUP message was not called when my mouse up on the caption bar of my window. please help me.. urgent ss

        M 1 Reply Last reply
        0
        • S ss431

          thanks for ur reply, sorry for my delay in giving this reply. I had done the same what you given in your reply. But i didn't get the result. WM_NCLBUTTONUP message was not called when my mouse up on the caption bar of my window. please help me.. urgent ss

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          I haven't tested this, but it's possible the default WM_NCLBUTTONDOWN message handler is capturing the mouse and sitting in a modal loop until the WM_NCLBUTTONUP is received.  This would be for the default window dragging. You may have to do the same. Responding to just the WM_NCLBUTTONUP message is unique.  What are you wanting to do when you receive that message?  Maybe there's a simpler alternative. Mark

          Mark Salsbery Microsoft MVP - Visual C++ :java:

          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