Sunday, July 12, 2009

How do you set the text of a dialog box in Visual Studio 2005 C++?

I have an MFC Visual Studio 2005 C++ application, and I would like to set the title of my dialog box to be whatever is in variable x (this is going to be inside a loop, and x will change. I want the user to know which name we're processing).





I tried,





this.Text = x;





but that didn't work. I think that's a C# construct, and I'm using C++.

How do you set the text of a dialog box in Visual Studio 2005 C++?
Are you constructing this form somewhere in a main? I don't program much in C++ these days but it seems to me you haven't even constructed your object (form).

blazing star

No comments:

Post a Comment