First time Creating Win32 application with UI

This is a discussion on First time Creating Win32 application with UI within the Windows Programming forums, part of the Platform Specific Boards category; I need to create a simple Win32 application with UI. I've done some Win32 programming before, but haven't really created ...

  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    34

    First time Creating Win32 application with UI

    I need to create a simple Win32 application with UI. I've done some Win32 programming before, but haven't really created a Win32 non-console application.
    There seem to be many options/combinations of option, and I was having hard time choosing which one to use.

    Couple of technologies I've come across while I was searching are

    MFC
    GDI(++)
    ATL support for creating UI
    Native Win32 APIs for controlling UI (window, dialog, etc...)

    From my understanding so far, it is possible to create a windows application (with UI) only with GDI++ and native win32 support, but it is rather a time-consuming task. So develoeprs use either MFC or ATL to simplify the implementation. It also seems that MFC is a dying technology, and people learn it only to be able to read legacy codes. So exactly when should I choose MFC over ATL and vice versa?

    One of the primary restraints I have with my program is, it has to be written in native code (can't use C# or Java for deployment reasons). However, the program itself would be relatively simple, you can think of it as a launching pad that launches preinstalled programs by clicking on some buttons. Thanks!
    Last edited by chiefmonkey; 09-22-2009 at 03:43 PM.

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    I would just use win32 if your application is simple. MFC and ATL really only save you time if you are planning on building something more complex. The fact that you can't use C# or Java really hinders you, but if you absolutely must use C/C++, then I would keep it simple with just win32. winprog is a pretty good place to start.
    bit∙hub [bit-huhb] n. A source and destination for information.

  3. #3
    Registered User Joelito's Avatar
    Join Date
    Mar 2005
    Location
    Tijuana, BC, México
    Posts
    308
    Why not try alternatives? Use gcc and try gtk+, wxWidgets, QT4, etc.

    There are dozens of frameworks to pick up.
    * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
    * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.

  4. #4
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,856
    MFC is much safer (easier for a novice to create a stable app) compared to pure WIN32.

    MFC is alive and well in the industrial engineering applications where the power/speed of C++ is required. MFC allows RAD of the UIs.

    That said many of my systems now include both rich client apps (MFC) and web interfaces (C#, ASP.NET) to review data.
    "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

  5. #5
    Registered User
    Join Date
    Apr 2007
    Posts
    137
    Avoid MFC (it's dead in Europe...)
    Just use the VS.NET Win32 wizard, and it's done in 5 seconds...
    And read the Petzold.

  6. #6
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,856
    MFC is the VB of the C++/WIN32 world.

    Pity, it is a great tool once you know when to use it, just like VB (need a test app to call your COM+ DLL?)

    Often WIN32 will crash where MFC will assert and allow graceful recovery.

    Quote Originally Posted by Alex31 View Post
    Just use the VS.NET Win32 wizard, and it's done in 5 seconds...
    One problem is the size of the .NET framework on embedded systems (ie doubles the size of a typical XPe OS install) which may be of importance to the OP.
    "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

  7. #7
    Registered User
    Join Date
    Mar 2007
    Posts
    142
    The sad thing about Windows development is that there is no proper way to do it.

    Pure Win32 is hard and you'll waste huge amount of time to make controls look good on all versions of Windows in use today. C# and .net are wrong too - Microsoft does not base a single major product on it, MFC is never recommended these days, forget about ATL and WTL, they are just lost in translation.

    It all started with Office style controls, I suppose! That was the sign that MS lost direction and that every part of it is going their own way. Pick technology that is most familiar to you, something that looks easiest, not something that looks right because nothing is right.

    Anyway you choose - any way you loose, or something like that.

  8. #8
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    Quote Originally Posted by idelovski
    C# and .net are wrong too - Microsoft does not base a single major product on it
    I'd call Visual Studio a pretty major product...
    bit∙hub [bit-huhb] n. A source and destination for information.

  9. #9
    Registered User
    Join Date
    Mar 2007
    Posts
    142
    Oh, I stand corrected.

  10. #10
    Registered User Joelito's Avatar
    Join Date
    Mar 2005
    Location
    Tijuana, BC, México
    Posts
    308
    Quote Originally Posted by bithub View Post
    I'd call Visual Studio a pretty major product...
    If you have itsService Pack, which now is 500 MB and maybe more.

    I think keeping simple is more effective: just give me a compiler, a make file, a good text editor and you are on. No need huge and hog IDEs to blow up your PC.
    * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
    * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. using 'cin' like function in win32 application.
    By blacksheep in forum C++ Programming
    Replies: 2
    Last Post: 01-30-2003, 01:49 PM
  2. Is this really true or it's just science fiction?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 145
    Last Post: 04-09-2002, 06:17 PM
  3. time class
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-11-2001, 09:12 PM
  4. Can I Load A Sound or Music Into My Win32 Application ?
    By SonicWave in forum Windows Programming
    Replies: 8
    Last Post: 09-21-2001, 07:54 AM
  5. How To Call A User-defined Class in Win32 Application?
    By SonicWave in forum Windows Programming
    Replies: 2
    Last Post: 09-18-2001, 10:23 AM

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