Best Regards
Steven Tang
Here are two quick ideas of how to make ActiveX get the drop message. You
may have been using the idea, but it's just for your references. I'm
performing more researches on this issue.
============================
Quick Idea 1
I suggest that you make sure that the ActiveX control implements
IObjectSafety interface. Only when a control is marked as safe can it
accept other windows messages. You may want to read these articles:
http://support.microsoft.com/kb/182598
http://support.microsoft.com/kb/161873
http://support.microsoft.com/kb/216434
http://support.microsoft.com/kb/168371
http://www.codeproject.com/KB/COM/firingeventsamongactivex.aspx
http://www.codeproject.com/KB/atl/ScriptableActiveX.aspx
============================
Quick Idea 2
Are you running IE in protected mode? If yes, these two articles deserve
your reading:
http://msdn.microsoft.com/en-us/library/bb250462.aspx
http://www.codeproject.com/KB/vista-security/PMSurvivalGuide.aspx
Especially the section "Drag and Drop to Other Applications" in the second
article. The article not only explains the reason for the behavior, but
also provides the solution of the issue.
If the above quick ideas are helpful to you, please kindly let me know. I'm
researching other ideas and will report back if I have any progress.
Have a nice day!
Regards,
Jialiang Ge (jia...@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
MSDN Managed Newsgroup support offering is for non-urgent issues where an
initial response from the community or a Microsoft Support Engineer within
2 business day is acceptable. Please note that each follow up response may
take approximately 2 business days as the support professional working with
you may need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations that require urgent,
real-time or phone-based interactions. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
But the IE still intercept the DROP file message to the AX control.
Any more hint?
--
=======================
Steven Tang
SYWWUYU)
**:)
We need to register the ActiveX control as the one to receive these events.
Here are several common mistakes that causes the dropfile event not to be
fired. If they do not apply to your control, do you mind sending a
reproducible project to me (jia...@microsoft.com)? I will test the project
on my side and try to figure out the error.
>> Common Mistake 1
For MFC activex controls CoInitialize() is used, but we need to call
OleInitialize() to have services like drag and drop, clipboard. So creating
an object of type COleDropTarget allows this through OLE
drag drop mechanism. When you create a COleDropTarget and register it in
the control, the MFC plumbing will take care of ensuring that it calls your
OnDropFiles method once the WM_DROPFILES message is fired.
>> Common Mistake 2
Another common mistake is that we miss the following PX_XXX code for
parameters to work from script:
void CXAcitveXCtrl::DoPropExchange(CPropExchange* pPX)
{
ExchangeVersion(pPX, MAKELONG(_wVerMinor, _wVerMajor));
COleControl::DoPropExchange(pPX);
// TODO: Call PX_ functions for each persistent custom property.
PX_Long(pPX,"BackgroundColor",m_backgroundColor);
}
(Suppose that BackgroundColor is a PARAM in the OBJECT tag:
<OBJECT ID="XFTP1" WIDTH=450 HEIGHT=346 ALIGN=TOP
CLASSID="CLSID:5C3729C9-6ED9-4A36-BF5A-2BF16CB586BD">
<PARAM NAME="BackgroundColor" VALUE=255>
.....
)
Best Regards
Jialiang Ge (jia...@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
Thanks a lot for helping.
=======================
Steven Tang
SYWWUYU)
**:)
""Jialiang Ge [MSFT]"" wrote:
> ......
Glad to be of assistance. :-)
Regards,