Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Drag & Drop

Drag & Drop

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++comdockerhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ananth_rs
    wrote on last edited by
    #1

    I have couple of questions, both related.. I would really really love to have even one answered .. Please help ... Question 1) I place a CEdit control on a View (CView Derived) , using CEdit's Create() function.. I want to allow the user to click on the Control in the View and to be able to drag and drop it at any new location in the View.. How do i implement this ?? Question2) I Created a AppWizard based MFC container application... I was able to place a RichTextBox Control in the view using COleClientItem::CreateNewItem(CLSID_RICHTEXTBOX) ... Then using the CRectTracker and its support for COleClientItem i was able to drag, drop and place my active X contol any where in the view as desired.. I want to know how i can invoke the Methods of that ActiveX control (I only have a pointer to COleClientItem's derived class variable which app-wizard created for me).... Also can i relate a CEdit control variable to a COleClientItem?? Thanks in Advance ananth

    V 1 Reply Last reply
    0
    • A ananth_rs

      I have couple of questions, both related.. I would really really love to have even one answered .. Please help ... Question 1) I place a CEdit control on a View (CView Derived) , using CEdit's Create() function.. I want to allow the user to click on the Control in the View and to be able to drag and drop it at any new location in the View.. How do i implement this ?? Question2) I Created a AppWizard based MFC container application... I was able to place a RichTextBox Control in the view using COleClientItem::CreateNewItem(CLSID_RICHTEXTBOX) ... Then using the CRectTracker and its support for COleClientItem i was able to drag, drop and place my active X contol any where in the view as desired.. I want to know how i can invoke the Methods of that ActiveX control (I only have a pointer to COleClientItem's derived class variable which app-wizard created for me).... Also can i relate a CEdit control variable to a COleClientItem?? Thanks in Advance ananth

      V Offline
      V Offline
      vgandhi
      wrote on last edited by
      #2

      to make drag and drop work you will have to implement OnDrop BeginDrag and DoDragDrop(Ibelieve this is the name). If you go to your view class and open up ClassWizard you will see a bunch of message handlers and if you scroll down you will see the ones for dragging and dropping. Also you might have to implement OnLButtonClick to instantiate your drag and drop. Hope this helps. vg

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups