How would I drag and drop something into a static control? It looks like I need to create a sub class of COleDropTarget and include that as a member variable in a custom CStatic. That doesn’t appear to be working though. When I try and drag something onto the Static control I get the drop denied cursor.
Share
The static control’s
m_hWndmust be valid when you callCOleDropTarget::Register, which is why it doesn’t work from within yourCMyStaticconstructor. What you can do is overrideCWnd::PreSubclassWindowwithin yourCMyStaticclass:There’s a really good article here on CodeProject that you may find helpful.