A quick Win32 console application supporting MFC on the .Net 2003: The code issued for the compiler:
// Create a CString object
CString csText = "I rock the .pdv world !";
csText.Delete( csText.Find( ".pdv" ) + (int)strlen(".pdv"), 4000 );
AfxMessageBox( (LPCTSTR) csText, MB_OK );
This code fragment, when run, displays the console window and pops up a message box reading: "I rock the .pdv". Logical conclusion: the code works, and your assumption of it's non-functionality was misplaced. I know your reply comment was meant humorous, but please.. I am tired of fixing things that aren't broken just because there are people in the wide world who think they know better. I don't mean anything malicious with this nor do I want to make you feel bad in any way, but I just don't find it funny. If you believe that you have more accurate information over a matter, present it, and perhaps point out the things that are incorrect in the earlier postings. It's just that this time, I was correct, you were wrong, and the code worked flawlessly and did precise what it was supposed to do. Perhaps next time, the situation will be reversed, and I'll be the one in need of learning new stuff :) -Antti Keskinen ---------------------------------------------- The definition of impossible is strictly dependant on what we think is possible.