How to Implement a Drag and Drop Control in Win32

LoveC 61 Reputation points

In Win32, I want to achieve the same effect as those controls in Visual Studio software. For example, some controls can be separated from the main window and turned into a window, which will be absorbed when the control is moved into the window with the mouse. Can a friend tell me what to do...Thanks,Very much!!!!!!!Everyone!!!!



Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,440 questions
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,554 questions
{count} votes

Accepted answer
  1. Jeanine Zhang-MSFT 9,181 Reputation points Microsoft Vendor


    As far as I'm concerned, there is nothing directly available API in Win32 to implement this, it is usually made up of framework wrappers (such as MFC... ) implementation.

    If you want to try to achieve this effect without MFC. I suggest you could try to use UI Automation to implement control patterns.

    I suggest you could follow the following Docs:
    Implementing UI Automation Control Patterns
    Dock Control Pattern
    Drag Control Pattern
    DropTarget Control Pattern

0 additional answers

Sort by: Most helpful