473,385 Members | 1,518 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ActiveX control with document/view architecture

Hi,

I am trying to create an ActiveX control (mediaplayer9.0 to be more
specific) over document/view architecture. The application is created on
VC++6.0 and its working fine.
But as soon as I port the same application from VC++6.0 to VC.Net and tries
to run the application, it gives an error in GetParent() function as this
function checks for ASSERT(::IsWindow(m_hWnd)). m_hWnd handle is assigned
inside CreateControl() call of ActiveX, which is happening perfectly fine
with VC++6.0.

1. I debugged the application in more detail for CreateControl() call in
both VC++6.0 and VC.Net and found that in VC.Net:
a. COleControlSite::XOleIPSite::OnInPlaceActivateEx() function is
getting called and assigning the (mediaplayer) control to be windowless.

In parallel to this VC++6.0 calls:
a. COleControlSite::XOleIPSite::OnInPlaceActivate(), which is doing
nothing but returning "OK".

2. In addition to above inside CreateControl() VC.Net calls:
1. COleControlSite::AttachWindow(), which actually assigns the handle to
“m_hWnd”. This is failing in VC.Net but working perfectly ok with VC++6.0 and
that’s the reason why control is working fine with VC6.0 and not with VC.Net.
Queries:
1. Can anyone let me know why the behavior (which is leading to error) is
changing in VC.Net??
2. Is point (1) defined above is causing failure of point (2) or its because
of some different behavior of VC.Net??
3. Anyone know if there is any change in ActiveX for VC.Net??

I have to use "m_hWnd" handle further in my application.

FYI: .Net/VC7/atlmfc/src/mfc/occsite.cpp (This is the path for
OnInPlaceActivateEx() and AttachWindow() functions).

Thanks,
Ajit

Jul 21 '05 #1
0 1543

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Filip Wtterwulghe | last post by:
Hello, We have a number of VB6 ActiveX applicationmodule(s) that are loaded into a IE6 WebBrowserControl . This WebControl is imbededded into Application X . Now We want to send a message from...
2
by: Fie Fie Niles | last post by:
This one XP machine (with IE 6) is having a problem viewing any ActiveX controls (created on VB6) on the Internet Explorer browser. I put the same ActiveX control in a VB program, and when I run...
1
by: torbs | last post by:
How can I create a fade with javascript that fade an activex object (quicktime) to the background and not to the IE windowed control. I call this function several times, each time decreasing the...
2
by: Tony Meier | last post by:
I am using the WebBrowser control (Explorer.Shell.2) from within a VBA application, embedded on an MS Access form to display the contents of a local folder. By default on Windows 2000/XP the...
2
by: S.Kartikeyan | last post by:
Hello group, I have the follwing problem with microsoft web browser activex control. I have a fileopendialog control. I open different files in the IEActivex control based on the filename in the...
4
by: qualitynice | last post by:
HELP :-)... I'm creating an embedded activex object in an asp.net page using the HtmlGenericControl class. I'm doing this because when I tried to embed it directly in the aspx page, it stopped...
0
by: Ajit | last post by:
Hi, I am trying to create an ActiveX control (mediaplayer9.0 to be more specific) over document/view architecture. The application is created on VC++6.0 and its working fine. But as soon as I...
0
by: Frank | last post by:
Any suggestions on how I should handle this? I was asked to convert a small web application that was written in classic ASP into ASP.NET. The original site uses some VBScript to interface with...
6
by: Budhi Saputra Prasetya | last post by:
Hi All, I'm trying to display .NET Custom Control (created using Inherited Control) on an ASPX page, but no luck. I already registered the Control to Global Assembly Cache through .NET Framework...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.