C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 04-08-2006, 04:05 PM   #1
Registered User
 
Join Date: Sep 2005
Posts: 241
How can I pass arguments through a GUI (win32)?

Hey, I learned how to make a GUI and I see all the buttons and other neato things I can do, the thing is how do I give them values to pass through the main program? Also, does the GUI and main program have to be in the same source file?
Sorry if my questions were naive and/or worded poorly or vague.
bikr692002 is offline   Reply With Quote
Old 04-08-2006, 05:09 PM   #2
Registered User
 
Join Date: Jan 2005
Posts: 847
If by GUI in the same source file you mean the window procedure then no but you'll need to declare it's prototype in a header and include the header in the source file that calls CreateWindowEx so that it knows where to look for the function defination.

As for giving them values. There are messages like EM_SETTEXT/WM_SETTEXT for setting the tex on controls. Some controls like listboxes let you set an lParam value to each item when you send the appropriate message.
Quantum1024 is offline   Reply With Quote
Old 04-08-2006, 05:17 PM   #3
Registered User
 
Join Date: Sep 2005
Posts: 241
Quote:
Originally Posted by Quantum1024
If by GUI in the same source file you mean the window procedure then no but you'll need to declare it's prototype in a header and include the header in the source file that calls CreateWindowEx so that it knows where to look for the function defination.

As for giving them values. There are messages like EM_SETTEXT/WM_SETTEXT for setting the tex on controls. Some controls like listboxes let you set an lParam value to each item when you send the appropriate message.
Ugh, that is confusing, how is the input supposed to reach the main source for like what was typed in the edit box and stuff...
bikr692002 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
GUI Programming... ShadeS_07 C++ Programming 12 12-28-2008 04:58 PM
Command Line Arguments Dilemma!! Want2Know C Programming 2 09-14-2005 10:35 AM
Thread Synchronization :: Win32 API vs. MFC kuphryn Windows Programming 2 08-09-2002 09:09 AM
.NET And GUI Programming :: C++ kuphryn C++ Programming 4 01-27-2002 04:22 PM
GUI Programming :: C++ Exclusive kuphryn C++ Programming 5 01-25-2002 03:22 PM


All times are GMT -6. The time now is 02:35 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22