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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. mouse event on dialog caption

mouse event on dialog caption

Scheduled Pinned Locked Moved C / C++ / MFC
question
2 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
    s o v a n n
    wrote on last edited by
    #1

    Hi! I want to create a dialog which resize to only caption when user double-click the caption area, then expand back when user double-click the caption again. How can we detect that mouse event in the dialog WindowProc? left-click, right-click, double-click? I tried WM_LBUTTONDOWN, WM_LBUTTONUP, WM_LBUTTONDBLCLK, but it works only in dialog client area. Thank you, Sovann. Everything should be made as simple as possible, but not simpler [Albert Einstein]

    A 1 Reply Last reply
    0
    • S s o v a n n

      Hi! I want to create a dialog which resize to only caption when user double-click the caption area, then expand back when user double-click the caption again. How can we detect that mouse event in the dialog WindowProc? left-click, right-click, double-click? I tried WM_LBUTTONDOWN, WM_LBUTTONUP, WM_LBUTTONDBLCLK, but it works only in dialog client area. Thank you, Sovann. Everything should be made as simple as possible, but not simpler [Albert Einstein]

      A Offline
      A Offline
      Arjan Schouten
      wrote on last edited by
      #2

      try this, WM_NCLBUTTONDBLCLK The WM_NCLBUTTONDBLCLK message is posted when the user double-clicks the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted. Arjan.

      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