Programming help! (C++)
I figure someone on here knows some programming. I don't, well not enough anyway.
Does anyone knows how to created a GUI (graphic user interface) in C++? I need to create one for a project. It doesn't have to be anything fancy. I just need two inputs from the GUI that can be used in my program as if they inputs in the command prompt.
Can anyone here help?
In search engine: gui c++
There will be other links, too.
I do but this isn't something you can just teach through an online forum. I would suggest searching blog articles or visiting a forum dedication to programming. Reading a book is your best bet.
what platform do you need the application to run on?
if this has to work on windows, you can do this in a couple minutes with visual studio 2005 or 2008.
create a new c++ project, and under clr, select windows form application. you can then add controls for whatever inputs you need from the vs toolbox, then import any existing code you need into the project.
there are other ways you can do this that suck a lot less, but they're more complicated, it sounds like you're just learning so there's no reason to over complicate things.
you could also make it cross platform using the Qt framework, but that's a whole different can of worms.
let me know if you have any more questions, and i'll try to help you out.
Hey sorry for the lack of replys. I didn't mean to ask a question and then take off.
I need this to run on windows xp. I really have no programming background, this is for a 4th year engineering project. Our prof "stongly suggested" that we have a gui istead of the command prompt.
I dont really have time to learn the language in detail, its a very small part of a VERY big project.
I will try what lakeripple said and get back to you guys.
If the project doesn't have to be in C++ you could write it in Java and use Netbeans and Swing to build a very simple, quick GUI. Java is pretty close to C++ for the most part so it would be an easy transition IMO.
It has to be in C++, no idea why.
I have made a little graphical interface following what lake ripple has said, and it runs and looks like what i want but i cant get it to do anything.
I created two text boxes that i need to be my inputs for my code, and a button to say ok.
Is there a way to link what is in those text boxes to a variable in my code? and is there a way so taht if you press ok it sends those two inputs to the variables and runs the rest of the program?
in the form designer, if you double click on the ok button you created, it will take to you the code for your form, and create a function for you. there you can write all the code that will be done when the user clicks on the button.
you need to create two private variables in the form code, and two get methods that return their values.
variablename = textboxname->Text->ToString() or ToCharArray(), to access the text in the textboxes from the form class.
then you can use the get methods you created, to return the variables in the from code to your code.