How to Implement a Drag and Drop Control in Win32

LoveC 61 Reputation points
2022-09-29T03:18:27.717+00:00

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!!!!

245864-visualstudio.png

245818-visualstudio2.png

Windows development Windows API - Win32
Developer technologies C++
{count} votes

Accepted answer
  1. Jeanine Zhang-MSFT 11,356 Reputation points Microsoft External Staff
    2022-09-30T02:31:04.49+00:00

    @LoveC

    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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.