Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Quick Question

  1. #1
    Regular Coder
    Join Date
    Apr 2004
    Location
    Philadelphia
    Posts
    241
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Unhappy Quick Question

    I'm assuming this is a very simple question... but what type of programming is used in programs that have 'windows.' Examples would be AIM, Aol, Windows Media Player, Etc. Everytime I use C++ I get a Command prompt and not a 'window.' Can someone explain this stuff?

  • #2
    Regular Coder
    Join Date
    Dec 2003
    Posts
    367
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That's because you're building it as a console application instead of a Windows application.
    You can use C++ to make windows apps, but you have to set up the project differently, and the programming is different as well.
    If you're using Visual C++, then when you create the project you have to choose "Win32 Application" as the project type instead of of "Win32 Console Application". Then you need to have a WinMain() function as the entry point instead of main(), you need to create a window using the Win32 API, set up a message pump to process messages the OS sends to your window, etc.
    Again, if you're using Visual C++, when you create the "Win32 Application" project you have a choice to make a "A typical "Hello World" application". You can choose that to see the basic code for creating a windowed application.
    But if you plan on going the windowed way, I'd advise to get a book about making Windows applications, since it is far from trivial. "Learn Visual C++ in 21 days" could get you started.
    Here are some tutorials too:
    http://www.initgames.gq.nu/tutorials/tut01.html
    http://www.relisoft.com/win32/
    http://www.functionx.com/win32/Lesson01.htm

    Of course, there are easier ways to get a Windows application up and running. Languages like Visual Basic and Delphi, make it a snap to design GUIs. They have their downsides as well, but for applications that don't need any heavy lifting, or some serious realtime performance, they're usually good enough.

    shmoove

  • #3
    Regular Coder
    Join Date
    Apr 2004
    Location
    Philadelphia
    Posts
    241
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Thanks! Now I get it!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •