View Full Version : Quick Question

04-07-2004, 08:49 AM
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? :(

04-07-2004, 09:49 AM
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:

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.


04-07-2004, 06:20 PM
Thanks! Now I get it!