c# or win32 api

This is a discussion on c# or win32 api within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Hello there. Me and my friends are trying to find a good (easy and powerful enough) way to build apps ...

  1. #1
    csd@auth
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    71

    c# or win32 api

    Hello there. Me and my friends are trying to find a good (easy and powerful enough) way to build apps with interface. Till now, I've tryed to learn win32 api using c(i find it too hard).
    But these days a friend of mine showed me a program he wrote in c# that amazed me and as he said, was simple to be done.
    Is c# a better way to build apps with interface than win32 api?
    What language and which purpose would you reccomend me for this purpose?

    I'd like to learn not only for fun but also for professional purposes.

    P.S. sorry for my bad english

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    For me, I use Gtk+ mainly because it's portable (well more than the Win32 API). You don't need to move languages just to build a user interface

  3. #3
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964
    Try taking a look at MFC, it's a framework for Win32 which makes everything a bit easier and faster.
    How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    If you want to maintain the C - like syntax and gain a bit more horsepower with GUI then C# is a definite option. As to whether it's better or not really depends on what you are trying to do. Some things are far easier in C# and some are not. MFC has a significant learning curve and C# does not. That fact alone may have already answered your question.

    Let's say that C# is yet another way for you to build GUI apps.

  5. #5
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    If you are looking for something with a less-steep learning curve, then C# is definitely a good way to go. C# is a nice language and it definitely helps make GUIs easier in Windows. But yeah you should also look into MFC.

    What IDE are you using? Visual Studio Express? C++Builder? If you are using either of those, then there are some drag and drop features that also help in designing a GUI.
    My Website

    "Circular logic is good because it is."

  6. #6
    csd@auth
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    71
    I can't understand what "...a less-steep learning curve" means! Does it mean that c# does the job easier but it's less powerfull? Something like basic??

    @DavidP: I'm using visual studio 2008

  7. #7
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    My Website

    "Circular logic is good because it is."

  8. #8
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    I have no idea why someone would recommend MFC or Win32 over C#. C# is easily more powerful for building windows-only apps, and especially GUI apps. There really is no comparison. And if you by chance find something that you can't do with .NET Framework classes, you can always use either COM or calls to unmanaged code. And also, the documentation and online examples on msdn are much better for C# than they are for MFC. This point shouldn't be minimized, because it's important to have good examples when learning this stuff.
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  9. #9
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Quote Originally Posted by IfYouSaySo View Post
    I have no idea why someone would recommend MFC or Win32 over C#. C# is easily more powerful for building windows-only apps, and especially GUI apps. There really is no comparison. And if you by chance find something that you can't do with .NET Framework classes, you can always use either COM or calls to unmanaged code. And also, the documentation and online examples on msdn are much better for C# than they are for MFC. This point shouldn't be minimized, because it's important to have good examples when learning this stuff.
    • Simplicity depends 100% on people. It cannot be used as an argument.
    • API and API wrappers are WAAAAAY quicker than C#. (Want an MD5 test?)
    • I totally hate the awful lag I get in C# applications.
    • API and wrappers use the quite useful device called the "processor".
    • Whereas C# runs through layers of bloatware.
    • C# is MSs crap, but many wrappers are portable.
    • Most dumbusers use C# so they need more documentation.
    • API also uses the software called the "Operating System" where C# still runs through bloatware
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  10. #10
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,437
    I want to point out that MFC is C++ and not C and it's only available in Visual Studio Standard Edition+. That means shelling out, like, $300 at least. Unless you are a student, you can get Professional for free.
    And all sort of frameworks are far better than pure Win32.

    Let's just say that C# is yet another way to build a GUI. It depends on your purpose and the time you want to spend on it. Sure, it's easier to use. Do you need it to create professional looking, shiny GUIs? No. It can be done, yes, but it isn't a requirement. The new 2008 MFC will allow you to do that once it's released.
    Plus, not to mention, there are several solutions out there for MFC/C++/C that already does this.
    MFC is slower to learn, but it's much faster than C#. It's just to take a pick. No one is going to force you.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  11. #11
    Registered User NeonBlack's Avatar
    Join Date
    Nov 2007
    Posts
    435
    API definitely beats C# in every aspect except ease of use. And the .Net framework keeps getting more and more bloated. (It nearly tripled in size from version 2 to version 3)
    If you just want something to play around with, then C# is probably fine. And I think in the near future more employers will be looking to hire "C-pound" experts, but anything you use to make windows apps will be eventually built upon the API, knowing a little API will never hurt you.

    So at last I say, Why not do both?
    I copied it from the last program in which I passed a parameter, which would have been pre-1989 I guess. - esbo

  12. #12
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Quote Originally Posted by Elysia View Post
    And all sort of frameworks are far better than pure Win32.
    Frameworks are not better than pure Win32, because good != ease_of_use, it depends on many other things too.

    You can't simply say something is better, you can only say that something is better at some aspect, because the importance of different aspects depends greatly on people.

    And btw, there indeed ARE awful frameworks.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  13. #13
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    I've written apps both ways (MFC and C#) and I can say I would never willingly choose MFC for a future windows GUI app. C# is just much much easier to use.

    BTW...just because something is easy to use, doesn't make it good. Yes, you're right. Absolutely. But if something is easy to use, and it also turns out to be good, then it will be prefered over something that is difficult to use and also good. And that is why I wil always prefer c# (for building windows GUIs or other windows-only apps).

    I should say that by trade I code in c/c++ for unix. So it isn't like I'm some m$ loving c#-hugger. I'm just calling it like I see it.
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  14. #14
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,437
    Quote Originally Posted by maxorator View Post
    Frameworks are not better than pure Win32, because good != ease_of_use, it depends on many other things too.

    You can't simply say something is better, you can only say that something is better at some aspect, because the importance of different aspects depends greatly on people.

    And btw, there indeed ARE awful frameworks.
    Maybe I overworded
    I suppose I was hinting at that Win32 API is horrible and that most frameworks goes to at least a length to hide that.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #15
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Quote Originally Posted by Elysia View Post
    Maybe I overworded
    I suppose I was hinting at that Win32 API is horrible and that most frameworks goes to at least a length to hide that.
    Horribility depends on what kind of code seems nice to you (for example I don't like the OO look of many wrappers).
    Quote Originally Posted by IfYouSaySo View Post
    BTW...just because something is easy to use, doesn't make it good. Yes, you're right. Absolutely. But if something is easy to use, and it also turns out to be good, then it will be prefered over something that is difficult to use and also good. And that is why I wil always prefer c# (for building windows GUIs or other windows-only apps).
    Well, actually it could be seen as:
    C# - extremely easy to use - good
    Win32 - easy to use - extremely good

    "The Internet treats censorship as damage and routes around it." - John Gilmore

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 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
  2. OpenSSL and Win32 SSL API :: SSL/TLS
    By kuphryn in forum Networking/Device Communication
    Replies: 0
    Last Post: 03-10-2004, 06:46 PM
  3. FILES in WinAPI
    By Garfield in forum Windows Programming
    Replies: 46
    Last Post: 10-02-2003, 06:51 PM
  4. OLE Clipboard :: Win32 API vs. MFC
    By kuphryn in forum Windows Programming
    Replies: 3
    Last Post: 08-11-2002, 05:57 PM
  5. Thread Synchronization :: Win32 API vs. MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 08-09-2002, 09:09 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21