I am trying to make some reusable GUI components for several desktop application projects. These projects are all Windows (Win7), Visual Studio, C++ based. What do you think would be the best way to approach this problem?
Right now i was thinking about one of these 2 ideas:
- MFC ActiveX Control.
- MFC extension Dll.
So far ActiveX has the benefit of being able to be integrated directly in the VS resource editor and this would make the integration easier.
On the other hand, ActiveX would allow only 1 GUI component per .OCX (am i wrong here? is it possible to incorporate more that 1 control in an .OCX file?) and this would mean that i would have to distribute a lot of .OCX files and it would just not look right.
Can you tell me if ActiveX is still considered a "modern" way of doing things? I wouldn't want to use something that is about to be deprecated.
Its not looking like you are here to learn.
This forum is to help you if you have any issues in the code which you have tried.
And for your information, everybody here in this forum is always kind, they are here to share their knowledge.
I have been using controls in VC++ 6.0 for years without any particular problem.
This time I wanted to shift to VC++ under VS2008, using unmanaged code .
I thought the same code that creates a trivial main window, and then the simplest Static control in the main window, would work well with VS2008 too.
It doesn't seem so .
I am wondering what's wrong with the following snippet :
I can see the main window appearing with the menu and all the rest, but the Static control doesn't appear.
I get a NULL handle as a return from its CreateWindow (). The error code is 1407, appearently meaning that the control class ("Static") is unknown.
I have been seaching all the MSDN documentation without finding an useful hint.
What's even stranger , the above code works perfectly under VC++ 6.0.
Any idea ?