CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2013

    Help getting started in making simple drag-and-drop application in C++

    Hey guys. First of all, GUI is not my thing - all of the programming I've done in the past has been pretty back-end systems/algorithms, etc. Have been out of it for a few years, and want to get back into it again for interest.

    I am trying to work on a few algorithms, and just want a simple GUI front end to do so. Nothing fancy, just want the ability to draw a rectangle, circle, etc. on a window and have the ability to drag and drop them in a different place - while seeing the rectangle, circle, etc. under the mouse while dragging.

    I downloaded Visual Studio Express 2012 just now, and if you guys can point me out to a quick tutorial or a few snippets of code to do this, it would be much appreciated. Also, I am a C/C++ guy.

    I just ran the following code, and it's obvious just a static output. What do I need to do to make it interactive? Again, I just need the quickest way of doing this. Thanks!
    case WM_PAINT:
    hdc = BeginPaint(hWnd, &ps);
    // TODO: Add any drawing code here...
    DrawingCode(hWnd, hdc);

    EndPaint(hWnd, &ps);

  2. #2
    Join Date
    Nov 2000
    Voronezh, Russia

    Re: Help getting started in making simple drag-and-drop application in C++

    Please see the sample. Sorry, it's MFC, but hope you can get the idea.
    Attached Files Attached Files
    Best regards,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.