C/C++ Using ActiveX Control Functions Without GUI (VC++)

Click For Summary
Using an ActiveX control in a Windows Visual C++ console application poses challenges, as these controls typically require a GUI environment to function properly. The original poster initially sought to call ActiveX functions directly from a console app but found limited resources on the subject. After exploring options, they opted to create a dialogue-based MFC application, integrating their code before the window is drawn to maintain functionality. They also mentioned plans to eventually port their solution to Linux and are considering using Flash UI for console app editing. The discussion highlights the difficulties of integrating ActiveX controls in non-GUI applications and the workaround of using MFC for successful implementation.
chickenwing71
Messages
41
Reaction score
0
I need to use an ActiveX control (and call on it's functions) from within a Windows Visual C++ console application. I can do what I need to with a dialogue-based MFC Windows application with a gui, but can't find any information on loading a control/calling it's functions from a console application. If this is possible, it would be immensely helpful on my current project. I'm using Visual Studio 2010 Professional, by the way. Any ideas?
 
Technology news on Phys.org
BUMP! I'm still researching it but I have two projects that would benefit from this. I'll keep you updated with my progress if any.
 
Without knowing what controls you're talking about, it's hard to say, but the ActiveX control might require that it be run in a Windows program rather than a console app.
 
Yeah, I ended up working around it. I was going to interface with it directly and write my own driver wrapper, but because of Windows USB enumeration issues, I just gave up.

So now I just built a simple mfc app, but slipped in all my code before it draws the window, so even if it's bloated and such, it works. I'm just going to go back at some point and port it all to linux.
 
I'm looking into using Flash UI for editing things in a console app.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

Replies
11
Views
2K
Replies
3
Views
1K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
12K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
9K
  • · Replies 5 ·
Replies
5
Views
8K
Replies
13
Views
19K