473,382 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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

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.
Nov 16 '05 #1
1 1125
> > 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.
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.
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Alan Mailer | last post by:
I'm thinking about FINALLY making the transition from VB6 to VB.net. A couple of questions first: 1) Is VB.net 2003 the latest edition? If so, are there any rumors that a newer version will be...
5
by: Bryan Parkoff | last post by:
Please provide me the information when it is not in the correct newsgroups. I have been using C and C++ language for a long time when it is time for me to learn Win32 API functions that they can...
7
by: Stephen Engle | last post by:
I am trying to allow for user account to take ownership of an Active Directory object. I have assigned the Modify Owner permission to the user on the AD object - a distribution list in this case. ...
8
by: Tony Johansson | last post by:
Hello! I just wonder what the difference is between a native win32-app and MFC. What I know is that you can use Win32 API in both cases. I think an MFC application is connected with a GUI...
3
by: Roberto Hernández | last post by:
I try to use the Windows Image Acquisition (WIA) with a sample in vb.net but it takes only back photos and also at low resolution. How can I put ther resolution at 640x480? I have a Labtec webcam...
1
by: Abubakar | last post by:
Hi, is there any win32 api or standard library function that would tell me how much memory my application/process is taking? What I want is to see how much memory some of my important functions...
0
by: jbenezech | last post by:
Hi all , I have a perl/java app running under Win32. The application consists of a perl service (Win32::Daemon) and of java classes. The perl service calls every xx hours java classes to perform...
3
by: somuchh8 | last post by:
Hi, I'm having a lot of trouble with the Win32::Spawn module in perl. Here is my situation, I have a Win32::Spawn call which looks like this: my $success = undef; my $cmdline =...
3
by: balach | last post by:
hi, what is WMI Query to get top most process name that is taking maximum cpu usage and memory usage. what is the syntax for wmi query and also which of win32 api will be used to call that...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.