WM_DROPFILES for individual control...
-
How do I get an individual control to accept WM_DROPFILES? I derived a class from CListBox and added the WM_DROPFILES handler. The control in the dialog resource has AcceptFiles set to true, and I even set:
BOOL CSourceListBox::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Add your specialized code here and/or call the base class
cs.dwExStyle |= WS_EX_ACCEPTFILES;
return CListBox::PreCreateWindow(cs);
}The icon just shows as if drop isn't allowed. :~ Any ideas?
~Nitron.
ññòòïðïðB A
start -
How do I get an individual control to accept WM_DROPFILES? I derived a class from CListBox and added the WM_DROPFILES handler. The control in the dialog resource has AcceptFiles set to true, and I even set:
BOOL CSourceListBox::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Add your specialized code here and/or call the base class
cs.dwExStyle |= WS_EX_ACCEPTFILES;
return CListBox::PreCreateWindow(cs);
}The icon just shows as if drop isn't allowed. :~ Any ideas?
~Nitron.
ññòòïðïðB A
startNitron wrote:
The icon just shows as if drop isn't allowed.
You have to manage the icon yourself. You can use a CImageList. It has a bunch of members dealing with drawing a drag icon (BeginDrag,DragEnter,DragLeave,EndDrag... etc.) You also use mouse events and maybe capture the mouse during a drag operation.
-
Nitron wrote:
The icon just shows as if drop isn't allowed.
You have to manage the icon yourself. You can use a CImageList. It has a bunch of members dealing with drawing a drag icon (BeginDrag,DragEnter,DragLeave,EndDrag... etc.) You also use mouse events and maybe capture the mouse during a drag operation.
led mike wrote:
Nitron wrote: The icon just shows as if drop isn't allowed. You have to manage the icon yourself. You can use a CImageList. It has a bunch of members dealing with drawing a drag icon (BeginDrag,DragEnter,DragLeave,EndDrag... etc.) You also use mouse events and maybe capture the mouse during a drag operation.
um... ok, i guess I wasn't clear on my issue... In the OnDropFiles fcn, I have a statement like: AfxMessageBox("Got Drop!"); the WM_DROPFILES message is never getting processed...
~Nitron.
ññòòïðïðB A
start