Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6333941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:33:47+00:00 2026-05-24T18:33:47+00:00

I have a dialog based MFC application that reads the coordinates of height and

  • 0

I have a dialog based MFC application that reads the coordinates of height and radius from a text file and displays it as a plot of points on a picture control window. Now, after the points have been plotted I need to be able to drag and drop a point to any particular location in the window in order for me to have the points coordinates changed to its new location. All this should be done by dragging and dropping it with my right click button. I do understand that the event that I should be using would be OnRButtonDown() and OnRButtonUp(), but I am unable to understand as how to include the drag and drop feature in my application. For your information, I have done the plotting of points, I just need to understand the implementation of dragging and dropping feature.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:33:48+00:00Added an answer on May 24, 2026 at 6:33 pm

    Several things for drag & drop:

    1. In OnRButtonDown(), you need to identify the point you’d pick up, set the RButtonDown flag to true.
    2. Check the flag and if true, post paint message to draw the plot dynamically per the new position of the point in OnMouseMove(), to make it as smooth as possible (not flashing), do not invalidate all but invalidate and redraw a certain region.
    3. In OnRButtonUp(), update the flag to false.

    You might also need to use SetCapture/ReleaseCapture in your OnRButtonDown()/OnRButtonUp() for the cases that you dragging and moving the mouse out of your dialog window.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MFC dialog based application in which I use ::system() function to
How can I print a document using MFC Dialog Based Application? I have made
I have created Dialog Based application in MFC (VS 2008).When I do #include in
I have a dialog-based MFC C++ app. My dialog displays a number of pages
I have a dialog based MFC application through which I have to call a
I have an MFC-driven dialog-based application created with MSVS2005. Here is my problem step
I am currently planning to access my MFC Dialog based application's .dll file using
I have a long-running console-based application Sender that sends simple text to STDOUT using
I have a long-running console-based application Sender that sends simple text to STDOUT using
I have to create a dialog based application, instead of old CFormView type of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.