473,804 Members | 3,163 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ActiveX control properties

Hi,
I am experiencing a very strange problem with VC++.NET
2002 and I'm hoping somebody can tell me what I'm doing
wrong or whether it's a bug.
I created an ActiveX control and added some properties,
and added some controls to the propertiy page and linked
the properties to them, at this point they were working
fine - the on changed event handlers were firing, the
properties were updating, the control's OnDraw was being
called and it and the other main control class's member
functions had visibility of the relevant variables and
they were correct. I then added some extra functionality
to the OnDraw procedure, and a global function. Then, for
no apparent reason, the control's properties were not
being updated when I edited the property page, and the
control's OnDraw event wasn't being called. I tried
putting InvalidateContr ol() in the event handlers for the
properties, such as OnBackColorChan ged in the control's
property page .cpp file, but that didn't work as they
weren't being called themselves! I couldn't understand
why, so I decided to start a new project and get to the
stage I was at when they were working, then copy and
paste the code I had written in bit by bit to see what
was causing the problem.
To add to my woe, this happened: I added one property to
the new control, a custom OLE_COLOR property, by choosing
the Add Propety option from the _DMyControl interface in
the MyControlLib node in class view, and added the
property fine. Then, when I came to add the second
property, in only had an option of property or function,
as opposed to property, function or variable, and it
displayed a totally different dialog box when I clicked
property! This time it had 'put' and 'set' options, so I
clicked help and it said these were only for ATL
projects!? This is bizarre, and totally confusing.
Does anybody know what is going on and what to do about
it? Is it a bug? If so, is there a patch available?

Thanks very much
Regards
Ben Taylor
Nov 16 '05 #1
1 1789
I manually solved this by checking the code that the
wizard generated against sample code in Prosise, and
discovered that he had the line DDP_Check(pDX,
IDC_MYBOOLPROP, m_myboolprop, _T("MyBoolProp" )) in the
DoDataExchange function of the property page's class -
but the wizard didn't add this so I added it manually.
Hmmm... I'm not entirely sure this has fixed it
completely, although it has made it work. Should there be
another wizard command that I'm supposed to be using to
do this instead?
Thanks
Ben

-----Original Message-----
Hi,
I am experiencing a very strange problem with VC++.NET
2002 and I'm hoping somebody can tell me what I'm doing
wrong or whether it's a bug.
I created an ActiveX control and added some properties,
and added some controls to the propertiy page and linked
the properties to them, at this point they were working
fine - the on changed event handlers were firing, the
properties were updating, the control's OnDraw was being
called and it and the other main control class's member
functions had visibility of the relevant variables and
they were correct. I then added some extra functionality
to the OnDraw procedure, and a global function. Then, forno apparent reason, the control's properties were not
being updated when I edited the property page, and the
control's OnDraw event wasn't being called. I tried
putting InvalidateContr ol() in the event handlers for theproperties, such as OnBackColorChan ged in the control's
property page .cpp file, but that didn't work as they
weren't being called themselves! I couldn't understand
why, so I decided to start a new project and get to the
stage I was at when they were working, then copy and
paste the code I had written in bit by bit to see what
was causing the problem.
To add to my woe, this happened: I added one property to
the new control, a custom OLE_COLOR property, by choosingthe Add Propety option from the _DMyControl interface in
the MyControlLib node in class view, and added the
property fine. Then, when I came to add the second
property, in only had an option of property or function,
as opposed to property, function or variable, and it
displayed a totally different dialog box when I clicked
property! This time it had 'put' and 'set' options, so I
clicked help and it said these were only for ATL
projects!? This is bizarre, and totally confusing.
Does anybody know what is going on and what to do about
it? Is it a bug? If so, is there a patch available?

Thanks very much
Regards
Ben Taylor
.

Nov 16 '05 #2

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

Similar topics

4
6548
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
0
1774
by: Miguel Guerreiro | last post by:
I have an ActiveX Control that I am trying to make work from an ASP page, but so far all I got is great frustation! My Control is well registered (and working fine from a VB stand-alone program I made in the same computer) Every time I load the ASP page I get a "Object does not support this property or method : SigBox1.IsOn". Initially, I thought that the error was caused because my Control was not registered well, so I made a VB...
5
8783
by: andy.g.ward | last post by:
I keep getting this when trying to create an MFC activex control in a c# windows service - anyone got any ideas what the missing module could be??? Exception thrown : System.IO.FileNotFoundException: The specified module could not be found. at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid) at System.Windows.Forms.AxHost.CreateWithoutLicense() at...
1
1768
by: Anand Kale | last post by:
How to have ActiveX control called from Web Form in ASP.Net ? ActiveX control is written using VC++/MFC/ATL-COM. Also kindly answer following issues, 1. Also how to take care of issues about security etc ? 2. Can anyone give me exact steps to embedd activex in a web form ? 3. Can the activeX control interact with the server side control on the web form ? 4. Do I need to register the activeX on client machine ? I want to download the...
3
2522
by: Jeffery Franzen | last post by:
Anyone know where the documentation is regarding Activex controls in asp web forms? I'm using VS.NET 2002 enterprise and am trying to use Activex controls in vb.net web form app. I do the add control to pallete and then add a reference. I get the interop dll added to bin folder. I did this with the MediaPlayer activex control as a simple case to to try and get it working. I set the control to autostart via the html parameter tag for...
3
2798
by: =?Utf-8?B?R3JlZyBN?= | last post by:
Hello, I'm running an asp.net, intranet web application using .net framework 1.1 on IIS5.1 / 6.0. Through the web application, I would like to press a button on the web page, have another window (not web-based or part of current application) brought to the front and focused (findwindow api) and have the button scrape the contents of the focused window so the contents can be parsed and entered into the web application. Ideally, I would...
4
1311
by: mmedved | last post by:
I ran into a problem using a custom ActiveX I wrote in VB 2005. It has a property that is "indexed" - that is, it has a parameter and needs to be addressed as (Index) - kinda like this: MyActiveXControl.MyProperty(Index) The thing is, VB2005 refuses to recognize that this property exists. Other - non-indexed - properties work ok, and show up in the little helper window as I type in the code, but the indexed properties do
0
1371
by: miarfej | last post by:
Hi to all.. i am just new here, hoping to find some suggestions. I am writing a code in VC++. It is about creating an activeX control using MFC. This control exposes the properties and methods of another (hidden, we may say) activeX control using IDispatch implementations (GetIDsOfNames, and Invoke). I have no problem with these things. My problem is that, I need also to expose the events of the hidden activeX control. That is, my custom...
1
1938
by: Jialiang Ge [MSFT] | last post by:
Hello Philippe, In addition to bruce's points, I'd suggest the KB article http://support.microsoft.com/kb/317392. It demonstrates how to host an ActiveX control in ASP.NET (for your first question), and points out that ActiveX control is a pure client-side control, the server-side code cannot access this control (for your second question). Server-side code can access only server controls, which are the controls that are listed on the Web...
0
10338
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
10082
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...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7622
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
6856
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
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
5658
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
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
3823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.