Click here to Skip to main content
15,905,232 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to create single setup file for MFC 8 applications? Pin
Jason Liu28-Nov-07 20:54
Jason Liu28-Nov-07 20:54 
AnswerRe: How to create single setup file for MFC 8 applications? Pin
Nelek28-Nov-07 22:29
protectorNelek28-Nov-07 22:29 
Questionhow to make form Pin
lili wulandhari28-Nov-07 20:50
lili wulandhari28-Nov-07 20:50 
AnswerRe: how to make form Pin
Hamid_RT28-Nov-07 21:11
Hamid_RT28-Nov-07 21:11 
AnswerRe: how to make form Pin
Nelek28-Nov-07 22:26
protectorNelek28-Nov-07 22:26 
AnswerRe: how to make form Pin
wira1guys29-Nov-07 17:26
wira1guys29-Nov-07 17:26 
Questionmanifest file Pin
George_George28-Nov-07 19:18
George_George28-Nov-07 19:18 
AnswerRe: manifest file Pin
Roger Broomfield28-Nov-07 19:46
Roger Broomfield28-Nov-07 19:46 
GeneralRe: manifest file Pin
George_George28-Nov-07 21:09
George_George28-Nov-07 21:09 
GeneralRe: manifest file Pin
Paresh Chitte28-Nov-07 21:43
Paresh Chitte28-Nov-07 21:43 
GeneralRe: manifest file Pin
George_George28-Nov-07 22:37
George_George28-Nov-07 22:37 
GeneralRe: manifest file Pin
Roger Broomfield28-Nov-07 22:02
Roger Broomfield28-Nov-07 22:02 
GeneralRe: manifest file Pin
George_George28-Nov-07 22:34
George_George28-Nov-07 22:34 
AnswerRe: manifest file Pin
KarstenK28-Nov-07 20:24
mveKarstenK28-Nov-07 20:24 
GeneralRe: manifest file Pin
George_George28-Nov-07 21:00
George_George28-Nov-07 21:00 
QuestionHow can make user name and password Case Sensitive Pin
Y_Kaushik28-Nov-07 18:27
Y_Kaushik28-Nov-07 18:27 
AnswerRe: How can make user name and password Case Sensitive Pin
Paresh Chitte28-Nov-07 18:32
Paresh Chitte28-Nov-07 18:32 
GeneralRe: How can make user name and password Case Sensitive Pin
Y_Kaushik28-Nov-07 18:42
Y_Kaushik28-Nov-07 18:42 
QuestionConversion of 'CString/Resouce String' to Char* Pin
Priya_Sundar28-Nov-07 18:10
Priya_Sundar28-Nov-07 18:10 
AnswerRe: Conversion of 'CString/Resouce String' to Char* Pin
User 58385228-Nov-07 18:17
User 58385228-Nov-07 18:17 
GeneralRe: Conversion of 'CString/Resouce String' to Char* Pin
Priya_Sundar28-Nov-07 18:24
Priya_Sundar28-Nov-07 18:24 
GeneralRe: Conversion of 'CString/Resouce String' to Char* Pin
User 58385228-Nov-07 18:26
User 58385228-Nov-07 18:26 
GeneralRe: Conversion of 'CString/Resouce String' to Char* Pin
Priya_Sundar28-Nov-07 18:33
Priya_Sundar28-Nov-07 18:33 
GeneralRe: Conversion of 'CString/Resouce String' to Char* Pin
User 58385228-Nov-07 18:38
User 58385228-Nov-07 18:38 
AnswerRe: Conversion of 'CString/Resouce String' to Char* Pin
Paresh Chitte28-Nov-07 18:39
Paresh Chitte28-Nov-07 18:39 
Priya_Sundar wrote:
char* CNewDialog::ConvertResIdToChar(UINT uResString)
{
CString strTemp;
strTemp.LoadString(uResString);
char* str = strTemp.GetBuffer(strTemp.GetLength());
//str = strcpy(chTemp, (const char *) strTemp); - NOT WORKING TO FILL UP TABLE

return (str);
}



You haven't allocated the memory for char* str.

char* CNewDialog::ConvertResIdToChar(UINT uResString)
{
CString strTemp;
strTemp.LoadString(uResString);
char* str = new char[strTemp.GetLength()];

strcpy(str, (LPCTSTR) strTemp);

return (str);
}

Regards,
Paresh.

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.