473,886 Members | 2,531 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(::IsWind ow(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::O nInPlaceActivat eEx() function is
getting called and assigning the (mediaplayer) control to be windowless.

In parallel to this VC++6.0 calls:
a. COleControlSite ::XOleIPSite::O nInPlaceActivat e(), 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
OnInPlaceActiva teEx() and AttachWindow() functions).

Thanks,
Ajit

Jul 21 '05 #1
0 1591

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

Similar topics

4
6555
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 Application X to all the ActiveX applicationmodules that are in IEWebbrowser . Contains Contains Application X ------------> IE WebControl -------------> Vb6 ActiveX A Contains
2
7583
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 the VB program on that same machine, I can view the ActiveX control fine. He is using Citrix. The same ActiveX controls can be viewed on other machines. When trying to view 1 of the ActiveX control, he got an error "Visual Basic Run-time redist...
1
2162
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 "opacity". id is the quicktime activex object. I have tried to set background:tranparent and background-color:transparent in my style sheet. //change the opacity for different browsers
2
3769
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 control displays the "Common Tasks" section on the left-hand side of the display - I assume it just shows/hides this based upon the Windows user's settings. Is there any way to change this to "Classic View", ie to remove the left-side "Common Tasks"...
2
4979
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 fileopendialog control. When i open ppt or doc or pdf files it is nice that it opens them in its window. THE PROBLEM NOW IS when ieactivex control is opening these different
4
3449
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 working once I changed it to run on the server (runat="server"). It said the GUID was wrong. I found code showing how to implement an activex control using the HtmlGenericControl class from the code behind file, but I can't figure out how to call...
0
286
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 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,...
0
1590
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 an ActiveX control, which is contained in a CAB file. Somehow, I have managed to use the original VBScript in a respective .NET page, but there are several problems.
6
3533
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.1 Configuration. I have also put a reference to the control on my ASP .NET project. The view that I get is only a disabled text area. Below is the code that I'm using:
0
9799
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10770
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10429
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5808
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6010
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4627
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4235
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3245
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.