Introduction

This is a crib sheet for how to add drag and drop to a dialog. It documents the
steps I found necessary. Note, this isn't a tutorial, just a collection in one
place of all the information required, you should check your documentation for full
details of the methods sketched out here (especially to confirm their argument lists).

Strangely, after doing (1) and (2) the results become visible in the
ClassWizard.

3)

Use ClassWizard to add an OnCreate() handler to your dialog. in this add
the call

this->DragAcceptFiles(TRUE);

This enables Drag and drop of files on your Dialog's window. You can
check this by dragging files over your Window. If the cursor is a "no
entry" sign (circle with a line through it) it's not working. If the cursor
changes to a file/folder icon with a "+" on it, you're in business.

The OnDragEnter should return a value (a DROPEFFECT) indicating that your
window will accept drop events
The OnDrop method handles the actual drop

6)

Make sure your methods have the right arguments. There
seem to be samples
floating round with the wrong arguments. If you copy from those your
routines won't get called

7)

(??) Make sure you add the ON_WM_DROPFILES() macro as above.
Failure to do
this caused my application to get no messages.

Things to check

1) Check your Register() or DragAcceptFiles() calls work.

2)

Check the cursor doesn't turn to a "no entry" sign when you drag over
your app.
If it does you've not called DragAcceptFile() or Register() successfully.

3) Check you've added the ON_WM_DROPFILES() to the AFX_MSG_MAP

4) Check your methods have the correct arguments

Miscellaneous notes

1)

As far as I can tell, checking "Accept files" in the resource editor
has
no effect. This is true for Dialogs, and is one of a number of options
in the resource editor that have no (or in the case of context sensitive
help, disatrous) effect.