MFC ActiveX control(.ocx file) on Internet exporer: File drag and drop

Hi,

I am working on MFC ActiveX control(.ocx file) on Internet exporer,  the
control includes a list control which is enable to accept file drag and
drop. But when control is hosted in IE, the drag & drop-ed file(image file)
is handled by IE instead by the control, the IE just simply display the
image file dropped. Could you tell me how to prevent the IE processing file,
and to let the control handle it?

Thanks a lot.

Charlie


0
charliehoo (16)
6/21/2005 1:31:30 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
832 Views

Similar Articles

[PageSpeed] 22

Hi Charlie,

Based on your description of problem, I understand you want to prevent IE 
processing the file drag&drop event and let your ActiveX control to handle 
it. Please let me know if I have misunderstood anything. 

If so, I think you need to customize the browser instead, for this is the 
default behavior of the IE browser, it will process and eat the drag&drop 
event which the embedded control wanted.

If you can customize the IE, I suggest you get IWebBrowser2 Interface by 
CLSID_WebBrowser at first, then call the 
IWebBrowser2::RegisterAsDropTarget, passing in VARIANT_TRUE, to prevent any 
drag-and-drop operations on your WebBrowser Control instance. 

Since customizing is not an easy work, please refer to the following MSDN 
doc for detailed info:

WebBrowser Customization 
http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/hosting/
wbcustomization.asp


Thanks!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ��C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn 

This posting is provided "AS IS" with no warranties, and confers no rights.

0
v-garych (605)
6/21/2005 10:06:56 AM
Reply:

Similar Artilces:

What are .pln files?
An attachment emailed to me is a .pln file that the sender claims to open with Word. My computer does not recognise this file. I tried the Microsoft web search for a solution which recommended RegCure. But RegCure didn't do anything. What is a pln file and how can I open one? -- Harry Its could be a Canon photo file. You can try inserting the file in your word document rather than just openiong it. I don't know what version of Word you are using so I can't give you the instructions here. Alternatively, try opening the file in your browser like IE8 or Mozilla/F...

Where is the Outlook .pst file located?
Using Windows XP, Outlook 2002 Two Questions: Can someone tell me where the main .pst file for Outlook is located in Windows, so I can back it up onto a remote server? If there are several folders containing emails, dodes each folder have to be backed up separately, or can all emails be backed up by backing up one .pst file? Thanks, "The Hun" <ed@LAocean.com> wrote in message news:5222a132-f978-4065-a5f0-7c7c5c9e33eb@e1g2000pra.googlegroups.com... > Using Windows XP, Outlook 2002 > > Two Questions: > > Can someone tell me where the main .pst file for Outloo...

A strange problem with MFC
Hi, Rencently I met a strange problem. The code like below: CWinThread* pThread = AfxBeginThread(ThreadFunc, (LPVOID)this, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED); if(pThread->m_hThread != NULL){ pThread->m_bAutodelete = FALSE; pThread->ResumeThread(); } After the statement "pThread->m_bAutodelete = FALSE" executed, I found the value of pThread->m_hThread is 0. While pThread->m_bAutodelete is still 1! The code section located in a win32 static library, with /Md option.The host application(exe) is a win32 console application, with /Md option. There...

Jet Engine MaxScanRows without an ini file or registry
I'm doing this: oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\;" & _ "Extended Properties=""text;HDR=No;FMT=CSVDelimited""" I want to set the "MaxScanRows=0" setting, but the only ways I can find to do this are to edit the registry or create a .ini file, and I don't want to do this - I want it all contained within the VBA. I suppose I could set the registry in the VBA and then set it back again, but if it crashes then that would leave a modified registr...

Form Controls
I have a form that I use as a switchboard to print off forms. How do I select a company name, then after I select the name have it print a report or form? Can't figure out how it all works together. Select Company from a combo box After select, what do you use to get the report to open for that Company? I'm confused. -- Denise B. Here's an example Dim strWhere As String strWhere = "IssueID = " & Me.[NameOfCombo]ID 'Debug.Print strWhere DoCmd.OpenReport "NameOfReport", acPreview, , strWhere Jeanette Cun...

about access Control List(ACL)
Hi! I just want to make sure that my understanding about ACL is correct Assume that you have a directory and a file. As I understand this a directory or file can only be connected to one ACL but you can have many Access Control Entries in this ACL. //Tony On 19-04-2010 12:33, Tony Johansson wrote: > I just want to make sure that my understanding about ACL is correct > Assume that you have a directory and a file. > As I understand this a directory or file can only be connected to one ACL > but you can have many Access Control Entries in this ACL. As I read:...

How do I change control colors
I create a dialog based MFC application in VC++ 6.0 and add some controls like edit boxes and buttons. I would like to change the defaultcolors of the controls. Is there no simple way to do this? I havn't found the answer in the docs. The only thing I have found is a SetBkColor method but that won't work. I have only succeded in changing the background color of the main dialog window with SetDialogBkColor. >I create a dialog based MFC application in VC++ 6.0 and add some controls >like edit boxes and buttons. >I would like to change the defaultcolors of the controls. Is...

Unicode in MFC
Hi, I am new to MFC programming and I have a problem: when I try to write the caption of a button or something else in my own language(Farsi), in the design mode it shows the correct string but when I compile it it shows a '?' instead of every character. Can anyone please help me with that. > I am new to MFC programming and I have a problem: > when I try to write the caption of a button or something else in my > own language(Farsi), in the design mode it shows the correct string > but when I compile it it shows a '?' instead of every character. Can > anyone ple...

internet update
I am on the road and accessing internet through hotel wireless connection. When trying to perform money internet update of my accounts, I get the error message: "You cannot perform this operation right now. There is an online operation in progress. Try again later." What online operation could it be (none apparent). Thanks, Don ...

how do I create a stationary from a .jpg (picture) file
how do I create a stationary from a .jpg (picture) file. Want to create stationary of footprints in the sand and use a an outlook stationary or template. You would be better served asking Outlook questions in an Outlook forum. This one is for Word. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>&...

Windows 98 .pub file isn't recognized by Windows XP
How do I access a .pub file generated with the Microsoft Publisher in Windows 98 in Windows XP Home Edition? It's not the version of *Windows* that matters - it's the version of *Publisher*. Which version of Publisher is loaded on the system with Win XP Home? And which version of Publisher are you using on the Win 98 system? -- JoAnn Paules MVP Microsoft [Publisher] "nhwoods" <nhwoods@discussions.microsoft.com> wrote in message news:8E4976B9-76AE-4E17-92F1-63F5607A67EB@microsoft.com... > How do I access a .pub file generated with the Microsoft Publisher in ...

return int value to OS in MFC App
Hi, Everybody. I have to make A MFC app to return int value to Operatiing System.. if i could use WinMain() function, this is not matter. but MFC does not reveal WinMain().... How can i solve this problem? Can Anybody help me with this problem? <flybluewing@bcline.com> wrote in message news:1189386249.923483.59250@y42g2000hsy.googlegroups.com... > Hi, Everybody. > > I have to make A MFC app to return int value to Operatiing System.. > > if i could use WinMain() function, this is not matter. > but MFC does not reveal WinMain().... > How can i solve this problem?...

Listview control in Excel
Could any body please help me in understanding a way to control scrollbars in Listview that I have created in Excel 2003. I do not want horizontal scroll bars at all.I have noticed that out of two listview of same width ,one has an item of length 20 characters and the other has items of 2 character.If I decrease the width of the second one it automatically starts showing scroll bars. How can I get rid of these? Regards, Shailesh ...

mfc and IE activeX
I'm using VS 2003 and trying to use Internet Explorer in my MFC application but encountering problems If I built a very simple test dialog-application and drop in the IE it works exactly as expected. However, when I create a similar dialog box in my MFC application and call the ...DoModal() nothing appears at all - not even the dialog box itself. It's as if my application does not want to use ActiveX components - I also tried a couple of other Microsoft ActiveX controls and they have the same problem. I must be missing something obvious - any one with any ideas will be much ...

May be not Excel...rather Explorer? Protect file from unintentional deletion
Hey guys :) My Excel-file is password-protected. This, of course, prevents the file from being destroyed by any casual user, but - 1) will he (or she) still be able to delete the excel-file in Explorer? 2) if so - how can I protect my file from being unintentional deleted by another user? Best regards Snoopy "Snoopy" <blaksnm@jjuc.no> wrote in message news:1f545bd4-a4ee-411f-8ded-28f28f1212d6@w28g2000hsf.googlegroups.com... > Hey guys :) > My Excel-file is password-protected. This, of course, prevents the > file from being destroyed by any casual user, but - > 1...

ActiveX Socket
I am developing an activex control with a TCP/IP socket. The activex control is written using vc++/mfc and the socket part is using CAsyncSocket class support of MFC. I am unable to connect to a server as I get WSAStartup not called 10093 error code. This is due to the activex test container supporting the control having a different process boundary. The proposed solution seems (and please correct me if I am wrong) to spawn a new thread from the activex control using afxbeginthread and make a connection to the server from this thread. Any comments on whether this will really work ? "High...

Command line
Is it possible to attach several files with swith /a ? outlook /a "e:\MyFolder\MyFile.xls" is correct but outlook /a "e:\MyFolder\MyFile1.xls" "e:\MyFolder\MyFile2.xls" is not correct I don't find a synthax to do that. Thank you. No, not possible. In case you are scripting this you might want to consider putting all files in a compressed folder first. -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "Etienne" <Etienn...

cannot open .xls files
Dear all, I am using MS Office XP. I am experiencing a problem when opening .xls files by double-click on them. After I double-click the files, the Excel problem is running but there is no .xls file opened. Although I can still open the file with command open in Excel, it is uncomfortable that double-click is not working. Can anyone tell me how to solve the problem? Thank you in advance. Best Regards, Thomas This is a multipost. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Thomas Lau" <thomaslau@FAKE.hotmail....

ActiveX Error in Business Portal
I have just installed Business Portal and when I access the Home page from a Terminal Server client, I receive the following message on a dialog box: An ActiveX control on this page might be unsafe to Interact with other parts of the page. Do you want to allow this interaction? Yes or No After replying yes, the page loads and functions fine. I have tried changing the Zone Settings under Tools >> Internet Options >> Security Internet and Intranet Zones and I can't seen to get rid of this dialog box. Any ideas would be appreciated. Thanks Mark Nabors Is t...

Outlook drops words off when email is printed
First Assume that I have done everything to correct this issue. Reinstalled Drivers, Changed Settings, Reinstalled Outlook etc.... What is happening is that when the users prints an email. Somewhere usually within the subj, To, CC, or BCC lines, the email gets printed and drops one of the words. This is usually the last or next to last. It is random. Does not occur on every email. Example Email: Subject: RE: Draft letter to the FTA requesting extensions of Buy America waivers Print Results Subject: RE: Draft letter to the FTA requesting extensions of Buy America ...

drop down list creation
I have an existing template that has a drop down list of our client's names. This is to the right of the actual template we use. I tried to add on a few more companies but the list is not providing it when I go to the Template's drop down list. Can anyone help? If this is a data validation dropdown, you may have to change the range to which it refers. Select the cell Choose Data > Validation Click in the Source box, and select all the cells that contain client names Click OK swesa wrote: > I have an existing template that has a drop down list of our client's names....

How do I convert .qpw files to excel format?
I have all my income tax files in .qpw format but no longer have that program to open them (computer change). I now have Excel and was wondering how I convert those .qpw files into Excel format? Thanks Try downloading and installing the WordPerfect 12 demo from www.corel.com. This includes Quattro Pro 12. A fully-functional 30-day trial is here: http://www.corel.com/servlet/Satellite?pagename=Corel3/Downloads/Trials I have Quattro Pro 11 and notice it will "Save as..." in "Excel 97" format. I just saved a Quattro Pro spreadsheet in that format and opened it in Exce...

CFG File for showing Email addresses in "CC" and "To" Fields
Hi all, My goal is to be able to make a distribution list easily when someone sends me an email with a lot of people in the "To" or "CC" fields. I am using gmail accounts through IMAP for Outlook 2007. I try and follow the Outlook help instructions, which tell me to copy and paste from these fields into the distribution list. However, because Outlook usually only displays the name and not the email address, it doesn't recognize an address when I copy and paste. I found these very helpful Slipstick instructions through a google search and was able to ...

Need Help with MFC!!
Hi all, need help esp. with Graphic part. When you right click on any drive on your machine and click properties, you get a tabbed dialog. I want to know how can I embed graphic image (pie chart) into my MFC Dialog? I have written code which displays the Disk Usage right now but don't know how to display that info as a PIE CHART!!!!!! besides what type of MFC Dialog application should I look fwd to build? I want exactly as the DRIVE properties. TIA -- ======== Regards Vai ======== Have you looked at the CDC::Pie method? joe On Wed, 12 May 2004 23:07:11 -0400, "Vai2000"...

MFC to Console.
Hello Group. I need to convert the code of WiniNet Async Demo from microsoft samples from MFC to a console function.. Someone can help me with the changes.. The code is posted here Regards /* Microsoft Corporation Copyright 1999-2002 */ /******************************************************************** ProjectName : AsyncDemo Purpose : This sample demonstrates how to submit two WinInet requests, using InternentOpenUrl, asynchronously. Notes : This sample does not handle any authentication. To properly handle authentication, the functions that handle specific protocols (like Ht...