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 518941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:59:20+00:00 2026-05-13T07:59:20+00:00

When you implement IDropTarget you must implement this: virtual HRESULT STDMETHODCALLTYPE Drop( /* [unique][in]

  • 0

When you implement IDropTarget you must implement this:

virtual HRESULT STDMETHODCALLTYPE Drop( 
            /* [unique][in] */ __RPC__in_opt IDataObject *pDataObj,
            /* [in] */ DWORD grfKeyState,
            /* [in] */ POINTL pt,
            /* [out][in] */ __RPC__inout DWORD *pdwEffect)=0;

I want to know what kind of data is coming in the IDataObject.

I did this:

FORMATETC fdrop = {CF_HDROP, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};

            if (SUCCEEDED(pDataObj->QueryGetData(&fdrop)) ){
                STGMEDIUM stgMedium = {0};
                stgMedium.tymed = TYMED_HGLOBAL;
                HRESULT hr = pDataObj->GetData(&fdrop, &stgMedium);
                if (SUCCEEDED(hr))
                {

But this only works when someone drop files. I saw that there’s also a CF_TEXT and CF_BITMAP, but I don’t want to query for all types of Clipboard Formats, so I want to know if there’s a way of querying IDataObject’s type of data.

CF_HDROP works fine for files, but when I drop an image from a browser for example, I don’t know what kind of CF_ to use… I tried CF_BITMAP but doesn’t work.

  • 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. Editorial Team
    Editorial Team
    2026-05-13T07:59:21+00:00Added an answer on May 13, 2026 at 7:59 am

    See IDataObject::EnumFormatEtc. As you can see from the documentation it may be possible to query for the data in multiple formats and EnumFormatEtc is a means to enumerate the various formats available.

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

Sidebar

Related Questions

Implement an algorithm to determine if a string has all unique characters. What if
I am trying to implement a drag and drop feature. On the left pane
To implement depth-first search in a grid, I wrote a function like this (define
I implement this interleave method in java but it doesn't work properly. Where is
I implemented the IDropTarget interface and the drag & drop (file from explorer) works
Implement double sqrt(double x) in C++ without using std library. This is a facebook
I implement some thing like this - person grid - name address action a
To implement a subscriptable object is easy, just implement __getitem__ in this object's class
i implement a wizard in c#, in this manner: private static void MyInitialization() {
I'm trying to implement drag and drop on a wx.TreeCtrl and I need to

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.