![](/style/images/good.png)
![](/style/images/bad.png)
Why isn't my shell namespace extension getting every single DragOver mouse messa...
source link: https://devblogs.microsoft.com/oldnewthing/20210514-00/?p=105214
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Why isn’t my shell namespace extension getting every single DragOver mouse message?
![Raymond Chen](https://devblogs.microsoft.com/oldnewthing/wp-content/uploads/sites/38/2019/02/RaymondChen_5in-150x150.jpg)
Raymond
May 14th, 2021
A customer had a shell namespace extension and discovered that when the user dragged an item, their custom drop target gets DragEnter
and DragLeave
method calls as expected, but the DragOver
method calls are being throttled. Specifically, they get a new DragOver
call only if the keyboard modifier state changes. How can they get a DragOver
call for every mouse move?
Explorer calls the shell extension when significant events occur, such as the user dragging over a different item, but it doesn’t call out for insignificant events, like the mouse moving one pixel.
The customer explained that they found that the default drag feedback for shell extensions doesn’t match the default drag feedback used by Explorer. In particular, the little information box that says “Copy to…” or “Move to…” is missing. The customer wrote their own information box window to show that information, so they need the precise mouse location information so they can position the information box properly.
Oh, if it’s the information box you’re after, then you could have just asked for the information box. (Another case of an XY problem.)
Explorer uses the shell drag/drop helper, so you can use the SetDropDescription
function we wrote last time. That will put the information box next to the drag image in exactly the same way that Explorer does. (Because this is the same method that Explorer itself uses to put information into the info box.)
The customer was kind enough to write back. “It works perfectly.”
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK