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 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,523 questions
C++
C++
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,637 questions
{count} votes

Accepted answer
  1. Jeanine Zhang-MSFT 9,431 Reputation points Microsoft Vendor
    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