Innistrad
Innistrad

Reputation: 63

Edit Control Is Behaving The Way It Shouldn't Be

At first, I made a Corba C++ Server in Win32 Console Application following this guide, and its working. From that code, I made a Corba Server in MFC.

From the C++ Win32 Server I have this code:

cout << argv[0] << ": server 'TestServer' bound" << endl;

And here the output:

C:\Users\innistrad\documents\visual studio 2010\Projects\TestServer\
Debug\TestServer.exe: server 'TestServer' bound

The content of the argv[0] is this:

C:\Users\innistrad\documents\visual studio 2010\Projects\TestServer\
Debug\TestServer.exe

So, in MFC, I made it like this:

msg = ": server 'TestServer' bound";
mDisp.SetWindowText(__argv[0] + msg);

Problem is, it's not displaying the values in the parenthesis.

But, when I do this

AfxMessageBox(__argv[0] + msg);

I am getting the output same as aforementioned.

I have tried to change the edit control to a new edit control and to a list box but to no avail. What seems to be the problem? Can anybody help?

Thanks.

Upvotes: 0

Views: 86

Answers (1)

N3Xg3N
N3Xg3N

Reputation: 97

What is the type of variable msg Try the following

CString msgStr = ": server 'TestServer' bound";
mDisp.SetWindowText(CString(__argv[0]) + msgStr);

Upvotes: 0

Related Questions