I have an activex control in MFC that that upload files when files are
dragged and dropped onto it. it works fine when executed in the
container that comes with the Visual Studio. The problem is while
running in the browser. when i drag and drop files on the active x
control in the browser it just opens the files in the browser. my
uploading function in the activex control is not invoked. How to make
my active x control upload files in the browser?. |
Request for Question Clarification by
mathtalk-ga
on
30 Dec 2002 21:06 PST
Hi, sumithra-ga:
Please clarify which control you are using. What is it called in the
Object Browser, for instance? Did you have to "Add Reference" to your
project in order to use this control in Visual Studio? What kind of
Visual Studio project are you working with? a C++ Window app? a Web
app? The first thing that occurs to me in thinking about how you are
"running it in the browser" is that you have some (client-side)
VBScript in a HTML file, opened in IE. But I need you to clarify what
is meant by "running in the browser" to avoid guessing.
thanks in advance, mathtalk
|
Clarification of Question by
sumithra-ga
on
30 Dec 2002 21:57 PST
I am using MFC active x control.
I am using MFC active x control wizard. and it is developed in Visual
Studio 6.
yes it is in VC++. I am using Microsoft ActiveX Control Pad to
incclude it in a html page. it is just html opened in IE.
my html file looks like this:
<HTML>
<HEAD>
<TITLE>New Page</TITLE>
</HEAD>
<BODY>
<OBJECT ID="APicChange1" WIDTH=1000 HEIGHT=495
CODETYPE="application/x-MyApplet"
CLASSID="CLSID:DD58830F-47C9-4548-B6B9-8EBA56030A96"
CODEBASE="http://Sdevi1:8080/APicChange.ocx"
>
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="2646">
<PARAM NAME="_ExtentY" VALUE="13070">
<PARAM NAME="_StockProps" VALUE="0">
</OBJECT>
</BODY>
</HTML>
i have implemented OnDropFiles(HDROP hDropInfo) function for uploading
dropped files. i also have the functionality of the active x
displaying certain picture as default and displaying certain other
function while the files are being uploaded.
i also have aprogress bar that shows the progess of the files being
uploaded.
it runns fine in the test container that comes with visual studio 6.
when i open my html page that has the active x control object , i can
see my default picture which makes me assume that the active x control
is loaded . but when i try to drag and drop files onto it , the
OnDropFiles function doesn't seem to be invoked. instead the files
just open in the browser as if there is no active x control there.
|
Request for Question Clarification by
mathtalk-ga
on
30 Dec 2002 22:08 PST
So to summarize, you developed this control yourself in Visual Studio
C++ 6.0, using the MFC Control Wizard. It handles the drag and drop
in the test container in the manner you expect ("uploads" the file),
but when placed on a page in the IE browser, the drag and drop appears
to be handled by IE before it reaches your control?
regards, mathtalk-ga
|
Request for Question Clarification by
mathtalk-ga
on
30 Dec 2002 22:27 PST
My guess is that you need a bit of VBScript on your page to tie the
drag and drop events in IE to your control. Apparently this can be
done in individual frames, but you might want to start by doing it
with a single 'main' window of the browser.
Check out these how-to articles:
://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=IE+%22drag+and+drop%22+%22window.event.dataTransfer%22&btnG=Google+Search
If you'd like me to post more detailed directions as an answer, let me
know.
regards, mathtalk-ga
|
Clarification of Question by
sumithra-ga
on
31 Dec 2002 01:09 PST
Thank you for your response. what is summarized is absolutely correct.
could you pls. give me more detailed directions as an answer.
Regards
sumi
|