Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: Tjaalie on August 03, 2005, 02:16:13 pm
-
Dear Topic Reader,
Im looking for a good resource editor to use with
code blocks. And a way to use ActiveX controls
with it. Does anybody know a way to get
a ActiveX control into a good resource editor
or in pure C++???
Tjaalie,
-
I don't know anything about integrating an ActiveX control in a resource editor, but I want just to tell you that there is a good resource editor provided with LCC-Win32.
-
I tried that one and it doesn't have that functionalaty.
Does anybody now a good one or is there a way i can
use the resource editor of Visual Studio C++.
Tjaalie,
-
ActiveX? Hmmm...
Try this. In your Visual C++ directory, there should be a few .exe's around. Maybe the resource editor is one of them. :)
-
There is one called ResEd, but its hard to track down.
http://www.radasm.com/ <--- go here, click on projects. It's a very good program.
-
Have you tried this one (http://www.sicomponents.com/soft/rbsetup.zip)? (Although, Its commercial)
-
There is one called ResEd, but its hard to track down.
http://www.radasm.com/ <--- go here, click on projects. It's a very good program.
How do i add ActiveX controls to it???
Anybody know how???
Tjaalie,
-
Have you tried this one (http://www.sicomponents.com/soft/rbsetup.zip)? (Although, Its commercial)
http://resourceeditor.sicomponents.com/ (a better link so you can see what it is first)
http://www.sicomponents.com/img/resbldr/scr1.png <--- oddly enough, a nice 'codeblocks' icon.
Tjaalie, can you not use the resed to make your dialog, and then manually create an active x control on the dialog during the WM_INITDIALOG message?
-
How do i add ActiveX controls to it???
Anybody know how???
You don't. ActiveX is COM (Component Object Model) technology, and has nothing to do with resource dialogs.
Microsoft's development environments simply abstract the process of linking to a registered component. ActiveX components are not actually anything like native windows widgets and can't be "dropped" onto forms/windows.
By the way, COM is gradually falling out of favor at Microsoft and elsewhere. Despite attempts to revitalize or save it (including DCOM and COM+), the component object model has proved too limited. It has no cross-platform capability, can only be effectively developed for with C++*, and has an organizational structure that can scare small children**.
.NET, one must admit grudgingly, is far more intelligently designed.
* There are always some work-arounds, but it's more difficult and time consuming to write modules in C (and close to impossible in many other languages). This is somewhat ironic, because virtually all of Win32 (the API) is C, and COM was initially introduced around the same time.
** I wish most COM programmers had taken a good look at HKEY_LOCAL_MACHINE\SOFTWARE\Classes before they became developers. That would have scared them away pretty nicely.
-
Owke but how do i add an ActiveX control at runtime???
Does anybody know a tutorials about this???
I used google to find something but i didn't
find anything usefull.
Tjaalie,
-
Also, very nice resource editor is in PellesC
http://www.smorgasbordet.com/pellesc/
-
Owke but how do i add an ActiveX control at runtime???
You've got a lot of reading to do. This is by no means a newbie-friendly technology. Note that most of these links point to additional topics in the sidebar table of contents.
http://msdn.microsoft.com/library/default.asp?url=/workshop/components/activex/intro.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/componentdevelopmentank.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/componentobjectmodelanchor.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncomg/html/msdn_basicpmd.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncomg/html/msdn_components.asp
I love this one, in particular:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/html/3578ca42-a4b6-44b3-ad5b-aeb5fa61f3f4.asp
Blatantly deceiving:
Purpose
COM is a platform-independent, distributed, object-oriented system for creating binary software components that can interact. COM is the foundation technology for Microsoft's OLE (compound documents) and ActiveX® (Internet-enabled components) technologies, as well as others.
My emphasis. Show me a COM module that runs outside of Windows and I'll show you a win32 emulation layer (or reimplementation).
Where Applicable
COM objects can be created with a variety of programming languages. Object-oriented languages, such as C++, provide programming mechanisms that simplify the implementation of COM objects. These objects can be within a single process, in other processes, even on remote machines.
They fail to point out this great variety. Additionally, to say that object-orientation simplifies the use of COM is a gross understatement. Only a real masochist would develop for a C++ API using a procedural language.
Developer Audience
COM is designed primarily for C++ and Microsoft Visual Basic® developers.
Developer Audience
COM is designed only for C++ and Microsoft Visual Basic® developers.
-
CodeGuru.com might have some activex stuff for you. They have a ton of windows programming stuff.
-
COM is a bit of a monster but it's not unthinkable to use COM objects in other languages. You basically just need to define the interfaces of the COM objects as a virtual table, and then use the virtual table to offset into the com object to invoke the various functions. I've done a media player (mp3, avi, mpg) in assembly which uses directshow com objects. There's a forum on doing this sort of stuff at the win32asmcommunity bulletin boards. But admittedly .net is a bit nicer to work with than com or activex objects. OTOH, since these MS technologies don't always pan out like they're supposed to (e.g. COM was supposed to unify object interface plug and play but CORBA is a nightmare) it might just make more sense to just package a portable C/C++ dll library. Every language in existence (almost) supports a C calling convention to use C library functions.