View Poll Results: What's making you stick with Win32?

Voters
23. You may not vote on this poll
  • Pure speed and performance concerns

    14 60.87%
  • Windows Forms with .NET don't handle all the situations I need

    6 26.09%
  • Users may not have the .NET Framework and I can't ask them to install it

    10 43.48%
  • I don't want to learn a new technology

    3 13.04%
  • I don't want to learn C#

    7 30.43%
  • Limited memory devices

    2 8.70%
  • Backwards compatibility with programs

    9 39.13%
  • Compatibility with backwards programmers

    8 34.78%
  • Other reasons (please post!)

    7 30.43%
Multiple Choice Poll.

Thread: Why do you still use Win32?

  1. #1
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986

    Why do you still use Win32?

    Given that the new version of the .NET Framework is coming out in a few months making Windows programming even easier, and given that .NET has been out for about 4 years now, I am interested in learning the reasons that programmers still stick with C and Win32. I'm not here to say .NET is better, but I would like to learn why you've chosen to stick with the Windows API.
    Last edited by nickname_changed; 09-14-2005 at 08:41 AM.

  2. #2
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    I personally hate the .NET Framework. As my Computing lecturer (rightly, IMO) said, "Programming is a lost art" due to things like .NET - it's all too easy for 'other people' to pick up programming, and the generally do it badly (even after much learning and Salem battering ()).

    Creates job opportunities I suppose (not in S. Wales though ).

    Apart from that the whole thing is too bloated for my taste.

    That's about it, I'm primarily a Linux developer anyway. Well, I'm the lead dev. in a project being released (firstly) for Windows and we're sticking to the win32 API.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  3. #3
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,058
    I like the performance of C and Win32 as opposed to Net Frameworks. I've developed an application to access a commercial security controller in both C(Win32) and Net Frameworks and the Net app is substantially slower than C (Win32). This may be partially due to my Net Frameworks inexperience. I'm a Net newbie.

    Right now I'm definitely committed to C (Win32) but I wouldn't rule out the possibility of my moving to Net Frameworks as I become more proficient in that area.

    Bob

  4. #4
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    There really isn't a good reason to switch to .NET. Proponents say that .NET is easier to program in, and faster too. Once you are proficient in C and the windows API though, it is very easy and fast to put together a GUI app using only win32. Additionally, C gives you more power, and greater programming flexibility.

  5. #5
    * Death to Visual Basic * Devil Panther's Avatar
    Join Date
    Aug 2001
    Posts
    768
    I believe asking why you stick to C/C++ with Win32API is like asking why not simply do VB as your main development language?! I believe C# like VB is amature, limited and the slowest thing microsoft could ever come out with... hell, It's like going next door through Alaska!
    The .NET platform is maybe easy to use... But does microsoft really use it for it's main developments?!!
    "I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe

    http://www.Bloodware.net - Developing free software for the community.

  6. #6
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    One of the biggest reasons I do not like .NET is because I do not like Windows forms, however, I will not deny that .NET is possibly the best thing to ever happen to a lot of windows programmers (which many many people DO like .NET, I find myself using my Antechinus C# editor from time to time just to explore.)


    The main reason I stick with Win32 is because I am not a very heavy object-oriented programmer, the only object-oriented language I've ever taken a real liking to is Java, and not much else. I have dabbled with C# a lot, and it is an exceptionally easy way to get something done in very little time, but it's not really my cup of tea. I'm not going to ignore the ease of .NET programming, and I'm not going to ignore the potential .net contains for the ultimate future of windows programming.

    Another reason I do not like .net is because I already have a very real and very strong attatchment to the win32 API. I do not think I have ever hit an API I liked using more than win32, not gtk+, not the mfc, not .net, nothing.





    And, in all honesty, if I want to get something done fast (not only fast development time, but also fast in runtime) for Windows, I'd just use Delphi.

    I believe C# like VB is amature, limited
    *If you think that, that is fine, but that does not make the potential usefulness of .NET or VB non-existant.
    *The tool is only as good as you choose to use it. Unless you have really used visual basic/c# and pushed it to it's absolute limits, you shouldn't say if it's limited or not, since someone else could have the ability to dig deep enough and make the most out of it, while you could not.
    Last edited by Mad_guy; 09-14-2005 at 04:15 PM.

  7. #7
    Amazingly beautiful user.
    Join Date
    Jul 2005
    Location
    If you knew I'd have to kill you
    Posts
    254
    Along the lines of those questions, why use either? Many API's such as FLTK or wxWidgets add minimal size (a few KB), and are much nicer to code with IMHO. You end up with a program which is just as good, takes up less code, and can easily be ported to other platforms if necessary.

    Does the Win32 API offer any advantages over these?
    Programming Your Mom. http://www.dandongs.com/

  8. #8
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    The problem with installing such applications using something like GTK+ is that it requires runtime files which nobody likes having to download, while with Win32, it's all in one place, and any win32 application using any system calls unless provided otherwise should work on every win32 system. (Unless you're using like a Native API call like (Zw/Nt)QuerySystemInformation, in which case you will need a very specific copy of NTDLL.DLL and Kernel32.DLL.) This is because the API is built in, not external.



    The Win32 API is not also only for graphical and GUI programming (which, as far as I can tell, is what we have primarily been talking about in this topic.) Win32 offers a plethora of types of APIs to use, GUIs (& controls), debugging apis, native APIs (Native APIs being APIs that can sometimes cause and maybe resolve ultra huge bugs), APIs to work with processes (opening, reading, writing and diagnosing them), memory mapped files, threading and allocation (in other processes/threads if nessecary in a case like DLL injection,) image help functions, structured exception handling, vectored exception handling (winXP only.) The Win32 API gives you a lot of power and flexibility over the windows system, which might not be possible otherwise, contra Linux and Linux users (such as yourself(?)) which you do not need such internal APIs because the Windows system is a much more protected environment than Linux is, which is why you can probe all over linux with the APIs you are given and linux will keep chugging. This is different than windows, in which it restricts you from doing certain things (again, the NT kernel is a very very very very protected environment) unless you do it it's way with it's given set of APIs which are fairly fully featured.
    Last edited by Mad_guy; 09-14-2005 at 06:32 PM.
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  9. #9
    Dump Truck Internet valis's Avatar
    Join Date
    Jul 2005
    Posts
    357
    I agree completely with those of you still with win32.
    Another issue I have is that I think C and win32 api is just more fun to program with.

  10. #10
    Registered User
    Join Date
    Aug 2005
    Posts
    96
    One reason I use the Win32 API is that you don't have to buy a compiler and libraries from MS. Also, IMO the Win32 API is faster and, more powerful than .NET. But I will say I use C++ instead of C for my programming language.....
    I have never used a cross platform GUI toolkit like QT or GTK or wxWidgets. I will agree that cross platform GUI toolkits are nice because they can be easily ported to another OS. But for Windows specific aps I don't see a reason to use anything but the Win32 API.

  11. #11
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    I have never written an MS-Windows GUI program using pure win32 api functions. So far all my programs are written with VC++ 6.0 and MFC. Why? Because I can write an MFC program in less than half the time the purest's can hand-code it with win32 api functions only. And MFC allows me to use win32 api functions any time I want.

    As for c versus c++ -- people writing MS-Windows programs in pure c code are still living in the stone ages. You and your ancient c skills are obsolete in today's business world.

    I haven't used Visual Studio .NET yet, but probably will get into it sometime within the next year or so.
    Last edited by Ancient Dragon; 09-14-2005 at 08:20 PM.

  12. #12
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    I have never written an MS-Windows GUI program using pure win32 api functions. So far all my programs are written with VC++ 6.0 and MFC. Why? Because I can write an MFC program in less than half the time the purest's can hand-code it with win32 api functions only. And MFC allows me to use win32 api functions any time I want.
    That is a matter of ability of the programmer, and it involves too many infinate complications and variables into the equation that can alter the path of how long it takes you to develop an application. The entire point of the MFC was to allow people who already knew what they were doing (i.e. win32 developers) to use the MFC to avoid rewriting their own code and making their own ill-developed classes with not much to offer up to instead use a highly complex and, if you ask me, stupidly built framework that is very fully featured. The MFC was never ment as a 'win32 phase out,' MFC was ment for people who wish to do what they want to do without dealing with repetetive code that they already understand over and over again. Using the MFC to simply display a GUI application is entirely pointless if you ask me, the place where the MFC gets useful is places like writing ActiveX controls, not simple GUIs which can be handled just as easily with C Win32. That, and modern form designers allow people to write a simple yet elegent Win32 application, while many consider this bad style, they do it anyway because it offers them that ability to get something done fast and have it work well without being babysitted with high level code.

    You can call Win32 hard and you can call it stupid, but the point is if you take the time to learn the skills of something like Win32, life gets infinately easier later on. Lots of people will agree to always learn the low API points of something before moving on to the higher level parts of it, because if you don't, not only will the entire framework not make sense since it is already built on existing and reliable technology (as in you will wonder 'how they implemented this without the mfc?'), but you won't know how to expand it because the high level code and the low level APIs work entirely differently, a method in which you cannot understand, so you're stuck with what you get as opposed to being modular and able to expand and make your own additions and classes to the MFC for your own and others use, which defeats the entire point of object oriented programming.


    As for c versus c++ -- people writing MS-Windows programs in pure c code are still living in the stone ages. You and your ancient c skills are obsolete in today's business world.
    What in the hell are you talking about? Not only are people writing in C not using 'ancient skills' but C continues to influence programmers TO THIS DAY and new programming languages. C won't be going away until type-safe languages are ultimately accepted, and in that world C++ will be gone too, since it is also not any more safe than C. Only languages such as Java and C# will remain, type safe languages that defeat the king of exploits such as the mythical buffer overflow, and type safe languages that avoid annoying off-by-one errors so you don't write a \0 byte into another string. Any C program can compete and be faster and better than any C++ equivlant depending on the skill of the programmer, many programmers are smart enough to lexically organize their code in a clean manner and thanks to typecasts and a little pointer knowledge can imitate any object-oriented concept from a strictly procedural language. Saying that C programmers will be left in the dust simply because they program in C is the stupidest thing I have probably ever heard. You could program for the remainder of your entire life and odds are 100,000,000 to 1, never say anything that horrifically dumb again.
    Last edited by Mad_guy; 09-14-2005 at 08:50 PM.
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  13. #13
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    I'm a C++ guy, I like the clarity and power of C++. However, if you prefer C++ to C# in the real world where bosses and deadlines rule supreme, think again.

    Your customer wants his data displayed in a listview with each line of positive data colored in green, each negative line in red. Your boss wants you to do this, no matter how. But today. I have no doubt that a C/C++ WinAPI freak can hack this. But in C# it's 20 lines of code and 4-6 clicks. I can do this before lunch. I'm pretty sure that even if you had memorized each line of pure WinAPI code you need, you wouldn't even be done typing by the time I come back from lunch.

    Each job has it's tools, and client application GUI is really not the job for C++. I wouldn't want to code a server in anything but C++, but I wouldn't want to code a client in anything but C#.

    The compiler and libraries for C# ( i.e. the .NET Framework ) are free btw.

    When I do something for fun, I'll probably pick C++. But most of the time I need to get a job done. And C# gets the job done.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  14. #14
    Registered User
    Join Date
    Jun 2005
    Location
    Stockholm, Sweden
    Posts
    64
    nvoigt has the answer alright.

    Sticking with a language, technique, framework, OS or what have you on principle is about as smart as driving on the left on principle*, just because that's how it used to be done and that's how it should always be done.

    If the .NET Framework was available on the target platform here at work, I would do nothing but code C#/.NET all day long, but unfortunately it isn't available. Which means I revert to one of two solutions, one is a command-line application which I also supply a VB-written GUI for so that the management can use it without hurting their delicate brains. The other solution is the entire application written in C/C++ using Win32 API.

    Which one I select depends on the complexity of the task and the deadline.

    * This of course only applies to countries who used to drive on the left hand side of the road and then later on switched to the correct way of driving on the right hand side, E.G Sweden.

  15. #15
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Some of my clients still use WIN95.....so WIN32 is no where near dead.

    For fun I use a mix of MFC and WIN32.


    nvoigt>>I have no doubt that a C/C++ WinAPI freak can hack this. But in C# it's 20 lines of code and 4-6 clicks. I can do this before lunch.

    I think we would be at lunch togather. Easy with a owner draw Listview.

    I had to do this in WIN32 C but not lines, each cell (>300 rows x 13 cols each cell individually coloured depending on the column and value).

    The client wanted the ''green' cells graduated by level of +ive.

    Also add
    blue = missed,
    yellow = 0,
    white = no colour required.

    end result......angry fruit salad
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Console program to Win32
    By Ducky in forum Windows Programming
    Replies: 3
    Last Post: 02-25-2008, 12:46 PM
  2. Win32 API or Win32 SDK?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 07-20-2005, 03:26 PM
  3. OLE Clipboard :: Win32 API vs. MFC
    By kuphryn in forum Windows Programming
    Replies: 3
    Last Post: 08-11-2002, 05:57 PM
  4. Thread Synchronization :: Win32 API vs. MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 08-09-2002, 09:09 AM
  5. Win32 API Tutorials?
    By c++_n00b in forum C++ Programming
    Replies: 9
    Last Post: 05-09-2002, 03:51 PM