 |
|
 |
i know more about activex control to read the article, its good
fds
|
|
|
|
 |
|
 |
you have not used c++.NET in your example, it is simply VC++!
|
|
|
|
 |
|
 |
Hello,
In word we can insert a picture and on top of
it we can insert autoshapes (circles, rectangles..)
I want to do this in vc.net so I have used a
picture box which has the image say a city map.The problem is I
dont know how I can draw ovals (transparent red colour) and I should be able to
rotate the oval also to pin point something on the map.
Do I have to create my own activex component or is there any other option.
Please give me some idea.
Thank you very much.
Minad
|
|
|
|
 |
|
 |
Hi Abdul,
Thanks for posting the useful article.
I used it in my test application, which is written in C++/MFC developed using VS 2005. I found VS 2005 crashed, when the control was added to a dialog box. The problem seemed to be caused by the ReleaseDC API. It complained that the hWnd was NULL.
According to the following article "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/devcons_66hv.asp" DeleteDC should be called instead of ReleaseDC, if the DC was created using CreateCompatibleDC. This seems to fix the problem.
Regards,
Andy
|
|
|
|
 |
|
 |
I recently created a basic ActiveX control as a starting point for a project I'm converting to an ActiveX control. I used AppWizard in VS 2005, and called my project "TestCtrl". I then, in the dialog allowing the class name etc to be modified, I noticed that by default "Ctrl" was appended to the name. As I didn't want it called "TestCtrlCtrl", I remove the final "Ctrl". After finishing the Wizard, I built the project, and it wouldn't build. It complain about several things not being defined, including _tlid.
I tried exactly the same in VC6, and it worked fine, so I compared all the files that were generated.
I found that VS.NET will generate some file names as .cpp/h and others as Ctrl.cpp/h. So, mine would have been TestCtrl.cpp/h and TestCtrlCtrl.cpp/h. By removing the Ctrl appended to my project name, the files had become TestCtrl.cpp/h and, oh, another TestCtrl.cpp/h. So, the first set generated, which defined _tlid etc, was overwritten by the second set with the same names! VC6 used a slightly different naming convention, and so this problem didn't arise.
So, anyway, it's all sorted, and I'm not going mad (which was my first thought) and there's not some fundamental bug in the AppWizard which prevents ActiveX controls being created (my second thought). Something to bear in mind though for future projects...
"The way of a fool seems right to him, but a wise man listens to advice" - Proverbs 12:15 (NIV)
|
|
|
|
 |
|
 |
Hello , thanks for the article. here's my problem : i have many resembling activex controls. they are infact controls that controls different types of IP Surveillance Camera. I need to develop an application that is independent of them, ie access them independently, so that when i add new control for a new camera, the application needs not be recompiled. so the code has to be external to the application, more than that the linking should be explicit and at execution time rather at load time.
I tried using a DLL which contains a Cwnd object that embeds the activex control in order to declare the EventSink map there and be able to capture events and then relay them to the application by telling the Dll to link to its caller module.
but i did'nt even succeed to make calls in the direct sense, ie application-->exp Dll functions-->Cwnd member functions-->activex specific members, so to create the object etc, the problem being MFC-class pointer can't pass between app and Dll !!?
So can you give me a way how to encapsulate the different activex components in an abstract one. i tried to see COM, but unsuccessfully: is there a sort of activex control inheritance at least ?
Thanks in advance.
charfeddine_ahmed@yahoo.fr
|
|
|
|
 |
|
 |
hello,
its a good article for learning and knowing about activex articles...
|
|
|
|
 |
|
 |
Can you tell me how to make ActiveX by C#?
Thanks.
|
|
|
|
 |
|
 |
good job. keep it up
Umer Mansoor
|
|
|
|
 |
|
 |
I tried to add your ActiveX to device control when I built a VB.net application for Pocket PC. But I can’t see control at the list.
|
|
|
|
 |
|
 |
First thanks for check it, my dear first register the activex control then add in vb.net application, also u can see the picuter in this article used in vb.net application
Abdul Hye
|
|
|
|
 |
|
 |
Dear Abdul,
It may be difference to use at VB.net windows application and smart device (pocket pc or win ce) application. I can add in this active control the vb.net windows application but not in smart device application. It shows gray color (disable) at device control list after I add in the toolbox.
Rgds
Hongbo
|
|
|
|
 |
|
 |
The idea is quite good.
But the problem is that i could not understand that why MFC is used
and NO .Net classes (with the garbage collector) applied to create
such an ActiveX component.
I am not quite sure that if using unmanaged code in VC.Net, the generated
code is CLR assembly or a real binary of VC6 type.
Can some one help me out:
What i am questioning is that, using MFC to create ActiveX component
is already achieved by using VC6, no need to use VC.Net.
If VC.Net is used with the classes in .Net library and the garbage collector,
and an ActiveX component generated, then this topic is meaningful.
Thanks
|
|
|
|
 |
|
 |
hi you are right and good thinker becoz the vc6 and vc.net use the same compiler i think. So but using in vc.net giving the idea working in .net environment.
with best wishes
Abdul Hye
|
|
|
|
 |
|
 |
This is almost the same question as the last one. In VC++ 6 you used the class wizard to add and delete methods properties and events to an ActiveX.
The previous thread shows how to add them in VC.Net but how do delete them?
Thanks.
Regards
- Roger
|
|
|
|
 |
|
 |
Hi
In the visual studio 6 there where a class wizard with a OLE Automation tab which I could add properties (even set the default property) and also methods to be invoked by the container.
But I could not find any equivalent for that in .NET environment. The class view does not provide such functionality even in its "Add ..." commands.
Thanks in advance,
Sohail.
|
|
|
|
 |
|
 |
In Visual C++ .NET, you need to select the interface in "class view" and right click. You will then select "Add..." and you get the option to add a method or property. The trick is to make sure you do it to the interface since the option will not come up otherwise. Good luck.
-Erik
|
|
|
|
 |
|
 |
thank u for replying in fact in these days i have not vc.net installed on my pc. also a little trick is that u create the control in vc.6 and then upgrade in vc.net
thanks
Abdul Hye
|
|
|
|
 |
|
 |
I want to know if it is possible create an ActiveX in c#.
I want to create a library, that it can be used by unmanaged codes, as Borland C++ Builder, and we can put into form with other .ocx.
Thanks in advance
|
|
|
|
 |
|
 |
you can create activex in c#. For the creation of library please tell me in detail on my email address.
Thanks for sharing words
Abdul Hye
|
|
|
|
 |
|
 |
I want to create activex in c#. Please, can you give me example for that?
Very thanks
|
|
|
|
 |
|
 |
it is nice article abdul hye , can it be possible to use event in it.
Pakaa
|
|
|
|
 |
|
 |
thanks, you can use it for event driven programming, it depends upon yours skills in vc++.
Abdul Hye
|
|
|
|
 |
|
 |
dear sir,
can i used this control in VC++.net.reply me
thanks.
vb coder
|
|
|
|
 |
|
 |
yes offcourse you can use it for vc++.net, simply rightclick on the toolbar and add the component and it on the form.;)
Abdul Hye
|
|
|
|
 |