Help...win 98 to win XP
-
Hi, i'm a beginner to all this so pls forgive me if this is a silly qn...i hv a dll that works on win 98 but i recently migrated to win xp. I've changed the project settings to _Unicode but i'm not sure how to modify the code so that it works the same way on win xp. For eg. how do i use AfxMessageBox? Also, how do i use CFileDialog class? The code i hv is: CFileDialog filenewdlg(TRUE, NULL, NULL, OFN_ALLOWMULTISELECT |OFN_HIDEREADONLY, "Part Files(*.asm)|*.sldasm||", this); But on compiling, the error i get is cannot convert parameter 5 from 'char[29]' to 'const unsigned short' 1) How do i correct this? 2) Is there anything else i need to know? Best regards and thanks in advance...
-
Hi, i'm a beginner to all this so pls forgive me if this is a silly qn...i hv a dll that works on win 98 but i recently migrated to win xp. I've changed the project settings to _Unicode but i'm not sure how to modify the code so that it works the same way on win xp. For eg. how do i use AfxMessageBox? Also, how do i use CFileDialog class? The code i hv is: CFileDialog filenewdlg(TRUE, NULL, NULL, OFN_ALLOWMULTISELECT |OFN_HIDEREADONLY, "Part Files(*.asm)|*.sldasm||", this); But on compiling, the error i get is cannot convert parameter 5 from 'char[29]' to 'const unsigned short' 1) How do i correct this? 2) Is there anything else i need to know? Best regards and thanks in advance...
If you are going to do a unicode project then all strings must begin with L eg. L"Part Files(*.asm)|*.sldasm||" to tell the compiler you want a wide string. But I would recommend you read up on TCHAR, that way you can compile your program in both UNICODE and single byte mode. I dont know any good unicode resource on the web, but if you are going to do a unicode project, then I recommend you read some books on the subject. Its a lot more to unicode than meets the eye. Also here on codeproject is http://www.codeproject.com/cpp/unicode.asp?target=unicode[^] http://www.codeproject.com/vcpp/stl/upgradingstlappstounicode.asp[^] Magnus