S
Sin
I'm currently evaluating VC.NET as the new platform for the company I work
for and things are looking grim... We're up against another IDE which took
me about 5 minutes to master and I've been bitching at .NET for the whole
day now not being able to do something as simple as showing a textbox's
content in a damn MessageBox...
The TextBox.Text is a String... MessageBox takes a LPCSTR (plain single byte
char*)... All our current code base is NOT unicode and there is no way in
hell we're converting to unicode. We can live with the fact the interface
will be unicode, as long as the conversions aren't too much of a problem
since we're only using the GUI options for debugging purposes... Our "real"
interfaces will be VB.NET (with occasional C/C++ using plain Win32).
Anyways... I simply want to use the plain ascii version of MessageBox to
show the contents of a TextBox I've put on a form... Should be simple...
I've tried everything from ASCIIEncoding, casting, PtrStringsomething,
StringToHGlobal, etc and nothing works. While we're at it, I'll most likely
need to do the opposite (putting a plain char string into a String)...
Any help would be greatly appreciated....
Thanks alot!!!
Alex (chewing his keyboard!).
for and things are looking grim... We're up against another IDE which took
me about 5 minutes to master and I've been bitching at .NET for the whole
day now not being able to do something as simple as showing a textbox's
content in a damn MessageBox...
The TextBox.Text is a String... MessageBox takes a LPCSTR (plain single byte
char*)... All our current code base is NOT unicode and there is no way in
hell we're converting to unicode. We can live with the fact the interface
will be unicode, as long as the conversions aren't too much of a problem
since we're only using the GUI options for debugging purposes... Our "real"
interfaces will be VB.NET (with occasional C/C++ using plain Win32).
Anyways... I simply want to use the plain ascii version of MessageBox to
show the contents of a TextBox I've put on a form... Should be simple...
I've tried everything from ASCIIEncoding, casting, PtrStringsomething,
StringToHGlobal, etc and nothing works. While we're at it, I'll most likely
need to do the opposite (putting a plain char string into a String)...
Any help would be greatly appreciated....
Thanks alot!!!
Alex (chewing his keyboard!).