944,123 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 1170
  • C++ RSS
Nov 1st, 2009
0

Win32 API and C++

Expand Post »
Hi all,
this is just curious question on C++ and winapi.
I have heard that win32api is written in C and at the same time I have heard people saying that "light weight" applications can be written using API.

This boggles my mind on how C++ works with C-based API. Does it mean I have to sell OOP for procedural C or what ? Please help me get the concept
Reputation Points: 462
Solved Threads: 392
Senior Poster
evstevemd is offline Offline
3,681 posts
since Jun 2007
Nov 1st, 2009
0
Re: Win32 API and C++
Pretty much, if you want to use the Win32 API, the code will look very similar to C, but that's why they made MFC.
Reputation Points: 1429
Solved Threads: 129
Posting Virtuoso
William Hemsworth is offline Offline
1,542 posts
since Mar 2008
Nov 1st, 2009
-7
Re: Win32 API and C++
win32 api was written in C so that it can be called from lots of other programming languages.

>>Does it mean I have to sell OOP for procedural C or wha
Yes, unless you want to use something else, such as MFC (not free) or wxWidgets (free).
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,961 posts
since Aug 2005
Nov 1st, 2009
0
Re: Win32 API and C++
win32 api was written in C so that it can be called from lots of other programming languages.

>>Does it mean I have to sell OOP for procedural C or wha
Yes, unless you want to use something else, such as MFC (not free) or wxWidgets (free).
Eh! I thing I will have to sell win32 API for wxWidget as I cannot pay for MFC
Reputation Points: 462
Solved Threads: 392
Senior Poster
evstevemd is offline Offline
3,681 posts
since Jun 2007
Nov 1st, 2009
1
Re: Win32 API and C++
There are a small number of us that write major Windows applications in various languages using almost exclusively the Win32 Api.

All programmers have their own biases, favorite way of doing things, etc. My favorite way of doing things most certainly doesn't suit everybody, but I've got to tell you, I find using the Win32Api directly for writting Windows applications to be optimal for me. I state this after having spent many years doing it all sorts of other ways, e.g., VB1 - 6, VB or C#.NET, MFC, etc.

What I found amusing about your post is your conception of writing programs against the Win32 Api as some kind of unusual and hard to imagine bizarre thing. It most certainly isn't.

What I think the reality is, is that a great many folks learn C++ now and start out writing console programs, then move on to writing GUI applications whose underlying foundation is the Win32 Api but this fact is all but hidden from them due to their passive acceptance of GUI libraries that completely hide the underlying Apis on which it is based. This process appears to me to be so far advanced at this point that many using GUI application frameworks aren't even aware that Windows doesn't require them. Period.

The other lamentable fact I have noticed in C++ and other languages is an over reliance on Windows Dialog Engine created windows. What inevitably seems to happen is that folks start trying to use these 'Windows' for things that they weren't designed for. Many times there are various complicated hacks that can be done to get these dialogs to do something they were never designed for, but in many cases they should never have been used in the first place.
Reputation Points: 244
Solved Threads: 31
Posting Whiz
Frederick2 is offline Offline
330 posts
since Jul 2008
Nov 1st, 2009
-7
Re: Win32 API and C++
Quote ...
as I cannot pay for MFC
Methinks Express indludes it as of the 2008 version (bit limited e.g no resource editor) And if you are a student, you could nab the pro version off Dreamspark.
Last edited by jbennet; Nov 1st, 2009 at 9:32 pm.
Moderator
Featured Poster
Reputation Points: 1800
Solved Threads: 575
Moderator
jbennet is offline Offline
16,534 posts
since Apr 2005
Nov 6th, 2009
0
Re: Win32 API and C++
Click to Expand / Collapse  Quote originally posted by jbennet ...
Methinks Express includes it as of the 2008 version (bit limited e.g no resource editor)
What is Methinks Express? I googled with no avail!

Click to Expand / Collapse  Quote originally posted by jbennet ...
And if you are a student, you could nab the pro version off Dreamspark.
That is! I need that UNESCO approved ID, and get the Pro version.
Reputation Points: 462
Solved Threads: 392
Senior Poster
evstevemd is offline Offline
3,681 posts
since Jun 2007
Nov 6th, 2009
-7
Re: Win32 API and C++
What is Methinks Express?

It means i think there is a version called Visual Studio Express
Moderator
Featured Poster
Reputation Points: 1800
Solved Threads: 575
Moderator
jbennet is offline Offline
16,534 posts
since Apr 2005
Nov 6th, 2009
-7
Re: Win32 API and C++
Click to Expand / Collapse  Quote originally posted by jbennet ...
Methinks Express indludes
No it doesn't have it.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,961 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Finding the highest and the lowest number out of 5 inputs...
Next Thread in C++ Forum Timeline: overloading assignment operator problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC