Sign in to follow this  

Question about C++

This topic is 4131 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Yes.

What you are currently writing is something called a console application. You want to look into using a Win32 Application project if you are using Visual Studio, if not, well its named something very similar in most other IDEs so poke around.

If you want to display real-time graphics then you will need to start working with a graphics API such as OpenGL, SDL or Direct3D. Google for any of these names and you will get lots of help.

Hope that helps,

Dave

Share this post


Link to post
Share on other sites
You will have to start learning the WIN32 API for that. Alternatively you can use wxWidgets, a rapper for the WIN32 API, to make your programs.

Google WIN32 and wxWidgets.

If you want a bog standard windows app, try C#.

Dave

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Qt4 is a very easy and clean cross-platform (Linux, Mac OS X, Windows) C++ API for writing applications, and also lets you embed OpenGL contexts.

Check it out: http://www.trolltech.com/products/qt/index

Share this post


Link to post
Share on other sites
Quote:
Original post by fishfin
I've tried java but the only compiler I can find is on the java home page and I can't figure out how to installed right...



There's two really good IDEs that you could try (both free). Netbeans and JCreator ...google either one. They're both very good.

Share this post


Link to post
Share on other sites
Assuming Windows, you would need to create a Windows application somehow, either directly or with a library as suggested above.

If you create a new project in Visual Studio and specify Windows Application in the create project wizard, that will give you a skeleton application that creates a window.

There is an API call called LoadImage that can give you a handle to a bitmap loaded from a file, and another one called StretchBlt that will let you draw the bitmap onto your window in the OnPaint handler.

To close on Enter, you'd need to add a WM_KEYDOWN or WM_KEYPRESS handler to the WndProc function that called PostMessage(Hw,WM_CLOSE,0,0).

Share this post


Link to post
Share on other sites
Hello

Writing Win32 apps with no console (the black window with white text) is a bit harder to understand if you're new to programming.

I suggest you don't learn this stuff until you are already a little advanced in C++.. a complete newbie in C++ might get discouraged by this.

now here are 2 Tutorials I found:
http://www.mdstud.chalmers.se/%7Emd7amag/code/wintut/
http://www.winprog.org/tutorial/

Remember, avoid Java like the plague (and C# for that matter :P) The pros stick with C++.. (I better run before they start flaming me :P LOL )

Share this post


Link to post
Share on other sites

This topic is 4131 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this