Click to See Complete Forum and Search --> : Outputing Variables in a dialog box?
MullerTime
June 7th, 2005, 11:53 AM
I am using MS Visual C++ 6.0 and I am using the resource editor to create a dialog box.
I cant figure out how insert a string variable into the box for output. Is there an easy way to output variables to the dialog box using the resouce editor?
Thanks,
Eric
golanshahar
June 7th, 2005, 12:33 PM
sorry for my ignorance :-) but what is exactly box of output?
if you want to set text to most of windows control, simply use the ::SetWidowText (..) APi...
if u meant to something else please be more specific.
if i helped dont forget to rate :-)
Cheers
MullerTime
June 7th, 2005, 01:02 PM
Basically, I want to make a dialog box that says "Program_Name.exe is being shutdown."
Where Program_Name would be a string variable holding the name of the program. I'm not sure how to do that.
I thought SetWindowText() only changed the text in the title bar of the window. I want to change the text in the dialog box.
Andreas Masur
June 7th, 2005, 01:10 PM
You need to put a static control onto the dialog and assign it an ID different from the standard one (IDC_STATIC). Then you can set the text with 'SetWindowText()'...
To retrieve the application name....take a look at the following FAQ (http://www.codeguru.com/forum/showthread.php?t=312468)...
MullerTime
June 7th, 2005, 01:47 PM
Thanks for the help guys
I think im just going to use MessageBox() because it is much simpler and seems to do everything I need it to.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.