How to add a badge in a dragging image in Windows?

Seungjin Lee 1 Reputation point
2022-03-18T08:33:29.03+00:00

Hello.

I'd like to add a badge in a dragging image in Windows like a dragging image from Explorer as shown in the picture. I mean the blue badge showing dragging files count.
PuQhM.png

I can make a dragging image using IDragSourceHelper but can't find any information on how to add a badge like what Explorer does.
Thank you.

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
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 81,941 Reputation points
    2022-03-18T13:55:08.72+00:00

    Explorer just draws the number of items on the Layered dragging window ("SysDragImage" class)
    (mainly DrawThemeBackground, DrawThemeText, then UpdateLayeredWindow)

    1 person found this answer helpful.