Why can't I drag text into my MFC app from IE?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: Why can't I drag text into my MFC app from IE?

  1. #1
    Join Date
    Feb 2009
    Location
    Portland, OR
    Posts
    1,488

    Why can't I drag text into my MFC app from IE?

    I can't seem to make IE selected text draggable into my MFC application. Take a look at the sample VS 2008 C++ solution attached. To illustrate, compile and open the app. Then open an IE (the one I'm using is IE 9 version 9.0.8112, update versions 9.0.12), select any text in it and drag it into the app's text box. It won't let you. But if you try it with practically any other web browser (Chrome, FF) it works just fine.

    Can someone explain why can't I make it work with IE?
    Attached Files Attached Files

  2. #2
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,021

    Re: Why can't I drag text into my MFC app from IE?

    I've tried it and works with no problem (Windows 7, Internet Explorer 9).
    See the picture:

    Name:  Drag & Drop from IE.jpg
Views: 149
Size:  67.5 KB
    Ovidiu Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

  3. #3
    Join Date
    Feb 2009
    Location
    Portland, OR
    Posts
    1,488

    Re: Why can't I drag text into my MFC app from IE?

    You didn't run IE and my app elevated, did you? I did my test on a Standard user account and there seems to be UIPI conflict between a lower privileged IE and my app.

  4. #4
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,021

    Re: Why can't I drag text into my MFC app from IE?

    I've simply tried under a standard user account and it works with no elevation or other stuff of this kind.
    Ovidiu Cucu
    "When in Rome, do as Romans do."
    Visit: Microsoft Virtual Academy
    Follow: https://twitter.com/#!/ovidiucucu
    My blog: http://codexpert.ro/blog/author/ovidiu-cucu/

  5. #5
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    5,960

    Re: Why can't I drag text into my MFC app from IE?

    Quote Originally Posted by ahmd View Post
    You didn't run IE and my app elevated, did you? I did my test on a Standard user account and there seems to be UIPI conflict between a lower privileged IE and my app.
    I confirm the effect exists.

    Windows 7 x64, UAC enabled, IE 9.0.12. It doesn't matter whether test app runs elevated or not. What matters is IE level. Being run elevated it pastes okay, otherwise operation fails, as IE seems does not recognize the app textbox as an acceptable drop target. What's interesting, when entering the textbox the icon looks change from standard 'no drop', black-and-white, transparent, no-shadow icon to red-and-white, opaque 'no drop' icon with a shadow.
    Best regards,
    Igor

  6. #6
    Join Date
    Feb 2009
    Location
    Portland, OR
    Posts
    1,488

    Re: Why can't I drag text into my MFC app from IE?

    Thank you, both.

    Evidently one needs to allow drag-and-drop from IE through the registry.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center