Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2013
    Thanked 0 Times in 0 Posts

    How to work with visual interface in C++?

    I am teaching myself C++, I have downloaded code::blocks and even run my first hello world scripts and a bit more, but so far all the tutorials I have bee using seem to using the shell command to display the data. I mean, when I run the program, I can only see the output from the command line interface, but I actually want to see panels, like the javascript window with button and everything, so, how do I actually call that in C++ terminology, and how can I run a simple hello world script or something similar using it? Is there any link that could show me a simple tutorial using this basic interface, instead of using a black screen to run everythin?

  2. #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Marion, IA USA
    Thanked 84 Times in 83 Posts
    Well you would need to use one of the available graphics toolkits. I like Qt myself and once you understand the basic signals/slots concept it's pretty easy. They use a styling language very much like CSS to define the look and feel of the GUIs.

    CodingForums Supreme Overlord
    All Hail Spookster

  3. #3
    New to the CF scene
    Join Date
    Jul 2013
    Thanked 1 Time in 1 Post
    To make a graphical user interface you need to use a GUI library. A gui library allows you to draw windows with elements like buttons, text boxes etc, which look like what you do in html.

    However there are plenty of gui libraries to choose from and you need to choose the right one for your needs.

    On windows for example you have the most elementary Win32 API window controls. These allow you to draw natively designed window elements ( native means which look like other applications on your system, for example notepad, wordpad, calculator).

    Other options include the .NET framework with the gui designers. If you are not comfortable with doing everything in the code, then can check out .net.

    Apart from these, there are other powerful gui tools like wxwidgets and qt. They allow you to code up gui very fast. and most importantly these libraries are cross platform.

    I prefer wxwidgets, due to portability and it being a very thin wrapper over win32 api.


Posting Permissions

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