Taking the plunge into C# from Win32/C++

  • Thread starter Thread starter 3doutpost
  • Start date Start date
3

3doutpost

I write my Windows code in the plain old Win32 API (no MFC at all) and
I'm finding that more of my apps would benefit from the use of 3rd
party controls.

As I understand it, I could embed them in my Win32 API based app but
the more sensible option would be to move to MFC.

If I'm going to consider a change in my development environment, I
figured I might as well move straight to C#.

Does C# make it easy to instantiate activex controls and use them in
your application?

Can anyone recommend a good book that illustrates some of the key
concepts - I've got the C# language one - just haven't had time to
look at it yet - but I'm looking for something more specific to
embedding and interacting with controls.

Many thanks.

Speedy.
 
I write my Windows code in the plain old Win32 API (no MFC at all) and
I'm finding that more of my apps would benefit from the use of 3rd
party controls.

As I understand it, I could embed them in my Win32 API based app but
the more sensible option would be to move to MFC.

If I'm going to consider a change in my development environment, I
figured I might as well move straight to C#.

Does C# make it easy to instantiate activex controls and use them in
your application?
Yes
Can anyone recommend a good book that illustrates some of the key
concepts - I've got the C# language one - just haven't had time to
look at it yet - but I'm looking for something more specific to
embedding and interacting with controls.
Professional C# 2nd Edition
Wrox Press
ISBN: 0-7645-4398-9

regards
A.G.
 
As I understand it, I could embed them in my Win32 API based app but
No it wouldn't! MFC is a bit dodgy for applications - you get a lot of fluff
for not much functionality. But what it IS useful for is creating ActiveX

by 'sensible', i meant easier to bite the bullet and learn all about
mfc rather than implementing my own COM containers in regular win32 -
sounds like c# might be the answer.

having said that, i see microsoft released wtl yesterday so i should
maybe look at that first in case the controls i want are already in
there.
It's very hard to use COM controls and the like in a standard Win32 project. If
you can do it, then I don't know how to! But MFC's not the answer.
I personally think the answer is to write UI code in C# as it's just less work,
and any code that is time critical in C++, which it can expose via a DLL
which C# can interface fairly easily with, even debug simultaneously within
the .NET IDE.

yeah - i have a version of msvc.net and have played with it a little -
it feels nice - why would you not do everything in c# though once
you'd gone that route - multiple inheritance issues ?
Yes, pretty much. I've not tried it with COM-based OCXs, only controls that are
made by .NET, for .NET. But I think it can consume OCXs fairly well, whether
they are created with VB6 or MFC.

good - sounds like this would work with the control i have in mind.

thanks for the info.

speedy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top