How to make windows form from c++ code (GUI)

Reply

Join Date: Jul 2006
Posts: 1
Reputation: L33VaNcL33F is an unknown quantity at this point 
Solved Threads: 0
L33VaNcL33F L33VaNcL33F is offline Offline
Newbie Poster

How to make windows form from c++ code (GUI)

 
0
  #1
Jul 16th, 2006
Hello everybody,
I'm totally newbie with c++ language.
I'm using Visual C++ 2005 Express Edition.
I like to make a working GUI with my first c++ code.
My question is:
How to insert this code to Windows Forms (GUI) that contain:
1. Press "Button" to randomly generate the number from the code
2. "TextBox" to display the result from generated number.

I hope someone will provide me the full code that i can compile it here.

Here is the code:

  1.  
  2. #include <cstdlib>
  3. #include <ctime>
  4. #include <iostream>
  5. using std::cout;
  6. int main( ) {
  7. // srand will set a random starting point for rand()
  8. // We use the time as a seed, as it's always changing
  9. srand( ( unsigned )time( 0 ) );
  10. // We generate a random number between 0 and 4013
  11. // 4013 because ( 22423 * 4013 => 89983499 and
  12. // 89983499 + 10016486 => 99999985 - our max value )
  13. int randomKey = rand() % 4013;
  14. // Output the generated key and don't immediately close the command prompt window
  15. cout << "Your random key is: ABC" << ( 10016486 + ( randomKey * 22423 ) ) << "\n";
  16. system( "PAUSE" );
  17. return 0;
  18. }

Tahnks for any suggestion and help.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 56
Reputation: Eddy Dean is an unknown quantity at this point 
Solved Threads: 3
Eddy Dean Eddy Dean is offline Offline
Junior Poster in Training

Re: How to make windows form from c++ code (GUI)

 
0
  #2
Jul 16th, 2006
Making GUIs in C++ is rather complicated. I suggest you try to download a tutorial about it. There are plenty of tutorials about GUI making out there.

If you're willing to pay http://www.experts-exchange.com/Prog..._21902809.html is pretty nice.


http://www.rohitab.com/discuss/lofiv...hp/t11408.html


Excuse me if I sound a bit rude, but next time please google before you post.


Greetz, Eddy
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,151
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1436
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Most Valuable Poster

Re: How to make windows form from c++ code (GUI)

 
0
  #3
Jul 17th, 2006
You can find two tutorials here and here
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 7
Reputation: Simon268 is an unknown quantity at this point 
Solved Threads: 0
Simon268 Simon268 is offline Offline
Newbie Poster

Re: How to make windows form from c++ code (GUI)

 
0
  #4
Jul 21st, 2006
hi all

i've downloaded the generic source code from the first link provided by Ancient Dragon.

Sorry if this is really basic, and i dont know what to look up on google to answer my question, but what do i do with the files? I'm guessing i have to put them somewhere in Dev C++ program but i dont know where.

Any help would be great

cheers
Last edited by Simon268; Jul 21st, 2006 at 9:04 am.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,581
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 461
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: How to make windows form from c++ code (GUI)

 
0
  #5
Jul 21st, 2006
Just getting the source code copied from any website is not much of an achievement, it would be better if you do a reality check and start learning C++ from ground up , from beginner to advanced and you will automatically figure out the answers to your questions.

Sorry if i have been rude but its best to have strong basics than just jumping in the fray not knowing wat the hell is going on.

Bye.
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 155
Reputation: mostafadotnet is on a distinguished road 
Solved Threads: 10
mostafadotnet's Avatar
mostafadotnet mostafadotnet is offline Offline
Junior Poster

Re: How to make windows form from c++ code (GUI)

 
0
  #6
Jul 25th, 2006
Hi L33VaNcL33F,
Search for Win32 API tutorials.
This would help:
  1. http://www.zeuscmd.com/

Good luck.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC