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. PostMessage() doesn't work while dragging a dialog

PostMessage() doesn't work while dragging a dialog

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 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
    singersinger
    wrote on last edited by
    #1

    here is the thing i am using PostMessage() to post several messages to a dialog box from several location this works just fine but when i am holding the dialog - e.g. dragging it - the dialog doesn't feel that a message is being sent i am using PreTranslateMessage() method to filter message so what is wrong with posting message to a dialog that is being hold - dragged - or if there is anything wrong, what is the solution for that thanks alot u guys

    M L 2 Replies Last reply
    0
    • S singersinger

      here is the thing i am using PostMessage() to post several messages to a dialog box from several location this works just fine but when i am holding the dialog - e.g. dragging it - the dialog doesn't feel that a message is being sent i am using PreTranslateMessage() method to filter message so what is wrong with posting message to a dialog that is being hold - dragged - or if there is anything wrong, what is the solution for that thanks alot u guys

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

      The system has probably entered a modal loop, eating all messages except mouse-related ones until the drag operation is complete. You may need to handle the drag yourself - WM_NCLBUTTONDOWN, WM_NCLBUTTONUP, MoveWindow(), etc. That way you can enter your own message loop and check for posted incoming custom messages. Mark

      "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

      1 Reply Last reply
      0
      • S singersinger

        here is the thing i am using PostMessage() to post several messages to a dialog box from several location this works just fine but when i am holding the dialog - e.g. dragging it - the dialog doesn't feel that a message is being sent i am using PreTranslateMessage() method to filter message so what is wrong with posting message to a dialog that is being hold - dragged - or if there is anything wrong, what is the solution for that thanks alot u guys

        L Offline
        L Offline
        led mike
        wrote on last edited by
        #3

        Try SendMessage(...)

        led mike

        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