CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12
  1. #1
    Join Date
    Jan 2008
    Posts
    5

    C++ newbie here... a stupid question needs answering

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: C++ newbie here... a stupid question needs answering

    As in a program that has a graphical user interface?
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  3. #3
    Join Date
    May 2002
    Posts
    1,435

    Re: C++ newbie here... a stupid question needs answering

    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.

  4. #4
    Join Date
    Jan 2008
    Posts
    5

    Re: C++ newbie here... a stupid question needs answering

    umm windows api??
    please elaborate on that or link some pages that explain it
    thanks

  5. #5
    Join Date
    Jan 2008
    Posts
    5

    Re: C++ newbie here... a stupid question needs answering

    yea laser light, something like that

  6. #6
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: C++ newbie here... a stupid question needs answering

    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.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  7. #7
    Join Date
    Jan 2008
    Posts
    5

    Re: C++ newbie here... a stupid question needs answering

    thank you.. i will do that

  8. #8
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: C++ newbie here... a stupid question needs answering

    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.

  9. #9
    Join Date
    May 2002
    Posts
    1,435

    Re: C++ newbie here... a stupid question needs answering

    Quote Originally Posted by c0olGuY77
    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.

  10. #10
    Join Date
    Jan 2008
    Posts
    5

    Re: C++ newbie here... a stupid question needs answering

    thanks, ill keep learning now that i know its not just boring command prompt windows

  11. #11
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: C++ newbie here... a stupid question needs answering

    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.

  12. #12
    Join Date
    Jul 2007
    Location
    london
    Posts
    247

    Re: C++ newbie here... a stupid question needs answering

    Quote Originally Posted by c0olGuY77
    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

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured