Click here to Skip to main content
15,890,741 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Std::string loadstring??? Pin
Stephen Hewitt7-Jun-10 20:31
Stephen Hewitt7-Jun-10 20:31 
AnswerRe: Std::string loadstring??? Pin
Randor 7-Jun-10 20:44
professional Randor 7-Jun-10 20:44 
JokeRe: Std::string loadstring??? Pin
Randor 7-Jun-10 21:21
professional Randor 7-Jun-10 21:21 
GeneralRe: Std::string loadstring??? Pin
Stephen Hewitt7-Jun-10 21:28
Stephen Hewitt7-Jun-10 21:28 
GeneralRe: Std::string loadstring??? Pin
Randor 7-Jun-10 22:34
professional Randor 7-Jun-10 22:34 
GeneralRe: Std::string loadstring??? Pin
Randor 8-Jun-10 0:29
professional Randor 8-Jun-10 0:29 
GeneralRe: Std::string loadstring??? Pin
Stephen Hewitt8-Jun-10 14:16
Stephen Hewitt8-Jun-10 14:16 
GeneralRe: Std::string loadstring??? Pin
Aescleal7-Jun-10 21:36
Aescleal7-Jun-10 21:36 
I didn't give you a 1 vote but the method I outlined will work for strings greater than 4096 characters, it just won't load the whole string. If you're really worried about that you have to use the OS/2 vintage "try it once to fail, once to succeed" method of sizing buffers.

And it'd be fairly easy to change Stephen's method to work for std::string - depending on how much you know about the resource and the characters in it it's either trivial (use the two iterator string constructor) or slightly harder (use wcstombs).

Ash
AnswerRe: Std::string loadstring??? Pin
Aescleal7-Jun-10 20:46
Aescleal7-Jun-10 20:46 
GeneralRe: Std::string loadstring??? Pin
Stephen Hewitt7-Jun-10 20:52
Stephen Hewitt7-Jun-10 20:52 
GeneralRe: Std::string loadstring??? Pin
Aescleal7-Jun-10 21:14
Aescleal7-Jun-10 21:14 
GeneralRe: Std::string loadstring??? Pin
Stephen Hewitt7-Jun-10 21:17
Stephen Hewitt7-Jun-10 21:17 
GeneralRe: Std::string loadstring??? Pin
Aescleal7-Jun-10 21:30
Aescleal7-Jun-10 21:30 
AnswerRe: Std::string loadstring??? Pin
Alain Rist8-Jun-10 7:22
Alain Rist8-Jun-10 7:22 
GeneralRe: Std::string loadstring??? Pin
gmallax8-Jul-10 1:18
gmallax8-Jul-10 1:18 
AnswerRe: Std::string loadstring??? Pin
Alain Rist8-Jul-10 3:42
Alain Rist8-Jul-10 3:42 
GeneralRe: Std::string loadstring??? Pin
gmallax9-Jul-10 0:42
gmallax9-Jul-10 0:42 
AnswerRe: Std::string loadstring??? Pin
Alain Rist9-Jul-10 2:42
Alain Rist9-Jul-10 2:42 
Questionfatal error C1001: INTERNAL COMPILER ERROR Pin
archana.srikar7-Jun-10 20:04
archana.srikar7-Jun-10 20:04 
AnswerRe: fatal error C1001: INTERNAL COMPILER ERROR Pin
Niklas L7-Jun-10 20:34
Niklas L7-Jun-10 20:34 
AnswerRe: fatal error C1001: INTERNAL COMPILER ERROR Pin
arun_pk7-Jun-10 20:40
arun_pk7-Jun-10 20:40 
QuestionUnable to print micron character µ (mu) in japanese OS Pin
arun_pk7-Jun-10 19:38
arun_pk7-Jun-10 19:38 
AnswerRe: Unable to print micron character µ (mu) in japanese OS Pin
GDavy7-Jun-10 21:17
GDavy7-Jun-10 21:17 
QuestionWindows message Pin
Pryabu7-Jun-10 19:27
Pryabu7-Jun-10 19:27 
AnswerRe: Windows message Pin
Stephen Hewitt7-Jun-10 19:37
Stephen Hewitt7-Jun-10 19:37 

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.