Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 57715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:44:04+00:00 2026-05-10T17:44:04+00:00

How would I drag and drop something into a static control? It looks like

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:44:05+00:00Added an answer on May 10, 2026 at 5:44 pm

    The static control’s m_hWnd must be valid when you call COleDropTarget::Register, which is why it doesn’t work from within your CMyStatic constructor. What you can do is override CWnd::PreSubclassWindow within your CMyStatic class:

    class CMyStatic : public CStatic {     ...     virtual void PreSubclassWindow(); };  void CMyStatic::PreSubclassWindow() {     CStatic::PreSubclassWindow();      m_MyDropTarget.Register(this); } 

    There’s a really good article here on CodeProject that you may find helpful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to drag and drop my data file onto a Python script
I have something like this: <div class=wrapper> <div class=drag object1>Example1</div> <div class=drag object1>Example1</div> <div
I would like to simulate dropping stones into a bucket on the web. Drag
I have a drag/drop operation on a Canvas that is supposed to do something
I'm trying to understand how this drag/drop javascript example would be done in jquery.
I need some combined functionality regarding drag'n'drop between two trees in ExtJS . The
I am using C#'s inbuilt drag and drop via Control.DoDragDrop(). I use an Image
I have several android constructs like custom dialog boxes, drag-and-drop implementations, and other standard
I cant find the Editor which would allow me to drag and drop controls
I need to react on the user drag an drop action on my form.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.