CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    53

    C++ Console App to a GUI

    Hi, I created a program in C++ (Console). I want to create a GUI for this. How can I achieve this? I'm using Visual Studio 2008.

    Thanks.

  2. #2
    Join Date
    Sep 2009
    Posts
    53

    Re: C++ Console App to a GUI

    I tried starting a new Forms solution and just copy and pasted the code over to new class's etc. I am confused how to use the buttons etc.

    Example:

    I Have a class called FilmsSLL (Fully implemented Singly Linked List, holding Film Nodes) I want to be able to do the following commands (Worked perfectly on console);-

    FilmsSLL Film;
    Film.add("FilmTitle");
    Film.add("FilmTitle2");
    film.save();


    now.. I can also call Film.load() which will load the previously saved films. This is all fine and dandy in a console app. When it comes to a form and button I dont know where to put the code... For If I put FilmsSLL Film; in the 'Int Main(){}' Part, I cannot place Film.add in the button click event. As it isnt even recognized. This seems logical, but I am explaining of what I want to achieve.

    Any ideas?

    Thanks.

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

    Re: C++ Console App to a GUI

    It's usually not very easy to just take an existing console app and wrap a GUI around it. While both forms of program can use the same "worker functions", the control flow is vastly different between the two, and GUIs usually imply a need for multiple threads if you're going to be doing any nontrivial processing.

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