CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2009
    Posts
    13

    Arrow Console and WindowGui based applications

    I have been programming for a while (2-3 months)
    I am wondering what is the difference between a console based and gui based applications
    I am sorry this is basic but true I don't know the basics much and soon they will be faded from my memory as time goes by.

    Thank you

    -Ballchain

  2. #2
    Join Date
    Jul 2002
    Posts
    2,543

    Re: Console and WindowGui based applications

    Console program is usually written by straightforward way: it starts from the beginning of the main function, makes some operations and exits.
    GUI programming is event-driven:
    http://en.wikipedia.org/wiki/Event-driven_programming
    Developer writing GUI program does not write main function. Instead of this, GUI program is mostly contains event handlers: for example, developer writes program reaction for keyboard and mouse user actions.
    In a low level, GUI application has its main function, like Console application. But this main function is provided by GUI framework, and developer writes event handlers.

  3. #3
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: Console and WindowGui based applications

    A GUI application is made up of thousands of pixels. Number of pixels depends on the size of window of of your application. Each pixel can have different color, and each pixel can have one of 1.7 million colors. But you need not to to work with pixels directly to make your application. Instead you can use set of controls, like Edit/Text-box, combo box, list box, tree control, list control (multiple columns), buttons, status bars, tab controls (like tabs in Desktop Settings), and more other controls. Applications like Windows Explorer, Task Manager uses these controls.

    CUI/Console applications, on the other hand have limited number of characters to play with. They are generally 25/43 rows by 80 columns, each character can have one of 16-colors. Not that interactive, you know!

    As Alex mentioned, GUI programming is event driven, whereas console programming is sequence driven. It means, use can utilize any of controls shown (like in Explorer, you can do whatever you wish), and the program "handles" those events for you. But in console programming, the program gives limited set of options to work on. Like you would be given a command prompt to type, or a menu to select (by arrow keys, or highlighted character). Few programs have more control, but still they aren't as interactive as true GUI.
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

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