Click to See Complete Forum and Search --> : C++ newbie here... a stupid question needs answering
c0olGuY77
January 30th, 2008, 11:16 AM
hi, im a newbie at c++, i just started learning functions and arguements.
sorry for asking such a stupid question but...
can u make a C++ program that is shown outside of the command prompt window?
thanks
ps: i admire all you guys and hope one day i rise to your level in programming
laserlight
January 30th, 2008, 11:22 AM
As in a program that has a graphical user interface?
0xC0000005
January 30th, 2008, 11:26 AM
Yes. All you need to do is access the Windows API from within your program.
If the program is designed as a windows program then it will automatically launch outside the command prompt after you type its name on the command line.
If it's a console program (runs inside and outputs text to the console window) you can still access the Windows API and create windows, etc. outside the command prompt window.
c0olGuY77
January 30th, 2008, 11:31 AM
umm windows api??
please elaborate on that or link some pages that explain it
thanks
c0olGuY77
January 30th, 2008, 11:47 AM
yea laser light, something like that
laserlight
January 30th, 2008, 12:02 PM
The answer is obviously yes. 0xC0000005 has given you a pointer on how to go about it on Windows. That said, you should build up your fundamentals before tackling a GUI.
c0olGuY77
January 30th, 2008, 12:05 PM
thank you.. i will do that
Lindley
January 30th, 2008, 12:05 PM
While using the Win32 API directly can get you some functionality, learning all the intricacies can be rather difficult. *If* you're looking to create a GUI program, I'd suggest using a GUI toolkit such as GTK.
0xC0000005
January 30th, 2008, 12:06 PM
umm windows api??
please elaborate on that or link some pages that explain it
thanks
The Windows API (application programming interface) is simply a set of functions located in the Windows system dlls that are called by an application to do whatever a Windows program does.
The Windows API functions are analogous to the C standard runtime library functions that you may be familar with. For example, by including "windows.h" in your application you have the prototypes for the basic functions needed to create simple Windows programs (outside of the command prompt window) in much the same way that including "stdio.h" in a console program allows you to do basic i/o in the console window.
The Windows API is not some obscure interface that's difficult to locate. Just type "Windows API" into Google and you'll find plenty of information.
If you want to know how to do something specific, then ask here.
c0olGuY77
January 30th, 2008, 12:08 PM
thanks, ill keep learning now that i know its not just boring command prompt windows
Lindley
January 30th, 2008, 12:12 PM
The particular method of IO----whether GUI or on the command line----is only one aspect of programming, and often the least important. Looking pretty is useless if your program doesn't do anything interesting.
That said, it can be rather neat to see visual results from your programs. That's why I took a Computer Graphics course and learned OpenGL.
g3RC4n
January 30th, 2008, 12:26 PM
thanks, ill keep learning now that i know its not just boring command prompt windows
thats what i used to be like, then i learnt the win32 api and i hardly ever code it, theres really no point in it unless your coding a program for use by idiots
although it's a fun thing to do
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.