Click here to Skip to main content
15,909,091 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: error Pin
SandipG 26-Feb-08 20:02
SandipG 26-Feb-08 20:02 
GeneralRe: error Pin
neha.agarwal2726-Feb-08 20:30
neha.agarwal2726-Feb-08 20:30 
GeneralRe: error Pin
ThatsAlok26-Feb-08 20:33
ThatsAlok26-Feb-08 20:33 
QuestionRe: error Pin
Rajkumar R26-Feb-08 20:34
Rajkumar R26-Feb-08 20:34 
GeneralRe: error Pin
ThatsAlok26-Feb-08 20:47
ThatsAlok26-Feb-08 20:47 
GeneralRe: error Pin
Rajkumar R26-Feb-08 22:04
Rajkumar R26-Feb-08 22:04 
GeneralRe: error Pin
ThatsAlok26-Feb-08 22:31
ThatsAlok26-Feb-08 22:31 
GeneralRe: error [modified] Pin
Rajkumar R26-Feb-08 22:45
Rajkumar R26-Feb-08 22:45 
ThatsAlok wrote:
your concern is also stand good, if it ansi app, then it could present problem.


what, i am taking about unicode app only,

LPCSTR data = (LPCSTR)LockResource(hResData); is wrong cast.
and CString (data) will internally call MultiByteToWideChar(); and is because of the wrong type cast.

if still didn't get, in a unicode app, try the following.

LPCWSTR resource = L"Wide Char Resource String";
LPCSTR data = (LPCSTR)(void *)resource;
CString str(data);


ThatsAlok wrote:
i become aware that she is working with wide character

you didn't direct correctly even you already aware.
And also unicode app doesnot restrict a custom resource as ANSI string, this is not a invalid guess as OP is using lockResource, and not LoadString().

modified on Wednesday, February 27, 2008 5:30 AM

GeneralRe: error Pin
ThatsAlok26-Feb-08 23:47
ThatsAlok26-Feb-08 23:47 
GeneralRe: error Pin
Rajkumar R26-Feb-08 23:55
Rajkumar R26-Feb-08 23:55 
GeneralRe: error Pin
ThatsAlok27-Feb-08 0:30
ThatsAlok27-Feb-08 0:30 
GeneralRe: error Pin
Rajkumar R27-Feb-08 0:41
Rajkumar R27-Feb-08 0:41 
GeneralRe: error Pin
ThatsAlok27-Feb-08 0:47
ThatsAlok27-Feb-08 0:47 
QuestionRe: error Pin
Rajkumar R27-Feb-08 0:53
Rajkumar R27-Feb-08 0:53 
GeneralRe: error Pin
ThatsAlok27-Feb-08 2:02
ThatsAlok27-Feb-08 2:02 
QuestionRe: error Pin
Rajkumar R27-Feb-08 7:53
Rajkumar R27-Feb-08 7:53 
GeneralRe: error Pin
ThatsAlok27-Feb-08 15:56
ThatsAlok27-Feb-08 15:56 
GeneralRe: error Pin
ThatsAlok27-Feb-08 2:10
ThatsAlok27-Feb-08 2:10 
GeneralRe: error Pin
neha.agarwal2726-Feb-08 20:54
neha.agarwal2726-Feb-08 20:54 
AnswerRe: error Pin
Rajkumar R26-Feb-08 22:07
Rajkumar R26-Feb-08 22:07 
GeneralRe: error Pin
David Crow27-Feb-08 3:54
David Crow27-Feb-08 3:54 
GeneralRe: error Pin
Killdude6930-Jul-08 4:00
Killdude6930-Jul-08 4:00 
QuestionHow to MATLAB Run with out Installing when MFC Button Pressed Pin
johnalek26-Feb-08 19:43
johnalek26-Feb-08 19:43 
AnswerRe: How to MATLAB Run with out Installing when MFC Button Pressed Pin
Rajkumar R26-Feb-08 19:49
Rajkumar R26-Feb-08 19:49 
AnswerRe: How to MATLAB Run with out Installing when MFC Button Pressed Pin
ThatsAlok26-Feb-08 22:35
ThatsAlok26-Feb-08 22:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.