Drag and Drop problems in MFC

Posted on 2008-11-14
Last Modified: 2013-12-04
I am trying to enable drag and drop in my MFC application. I am dragging elements from a tree control to a list control and I am processing the following messages:

Everything works fine in debug mode but the release executable crashes as soon as I drag an item. Has anyone come across this issue before?
Question by:top-gun
    LVL 43

    Assisted Solution

    >>>Everything works fine in debug mode but the release executable crashes

    Sounds like an error in code - have you iniitialised all variables? (The debug mode build does it automatically, release mode does NOT).

    Accepted Solution

    Thanks for your reply. It turned out to be an issue with message reflection which was causing the release version to crash.

    I was using the following to detect dragging:

    Changing this to following fixed the issue:


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
    For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now