Click here to Skip to main content
15,898,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Get Windows Standard Dialog Color Pin
master879-Jan-06 7:05
master879-Jan-06 7:05 
GeneralRe: Get Windows Standard Dialog Color Pin
master879-Jan-06 7:16
master879-Jan-06 7:16 
GeneralRe: Get Windows Standard Dialog Color Pin
Nish Nishant9-Jan-06 7:19
sitebuilderNish Nishant9-Jan-06 7:19 
GeneralRe: Get Windows Standard Dialog Color Pin
Nish Nishant9-Jan-06 7:20
sitebuilderNish Nishant9-Jan-06 7:20 
QuestionMapping Network drives Pin
Priya..k9-Jan-06 4:07
Priya..k9-Jan-06 4:07 
AnswerRe: Mapping Network drives Pin
David Crow9-Jan-06 4:20
David Crow9-Jan-06 4:20 
QuestionWhich Callback? Pin
Maciej Lisiewski9-Jan-06 3:48
Maciej Lisiewski9-Jan-06 3:48 
AnswerRe: Which Callback? Pin
Rage9-Jan-06 6:10
professionalRage9-Jan-06 6:10 
Maciej Lisiewski wrote:
DWORD __stdcall MEditStreamInCallback(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
{
CString *psBuffer = (CString *)dwCookie;
if (cb < psBuffer->GetLength()) cb = psBuffer->GetLength();
for (int i=0;i *(pbBuff+i) = psBuffer->GetAt(i);
}
*pcb = cb;
*psBuffer = psBuffer->Mid(cb);
return 0;
}


The for has not been correctly transposed (the < got read as HTML tag, and the rest was ignored).

Anyway, I suppose you get the first char read in for some reason as non unicode (that's "the first letter of the string") and the second char, also read in as non unicode, and which should be the Unicode char second byte, terminates the string. So you get a string with only one char.

~RaGE();
GeneralRe: Which Callback? Pin
Maciej Lisiewski9-Jan-06 6:34
Maciej Lisiewski9-Jan-06 6:34 
GeneralRe: Which Callback? Pin
Rage9-Jan-06 8:12
professionalRage9-Jan-06 8:12 
Questionthread and standard Input (stdin) Pin
hellomoin9-Jan-06 3:33
hellomoin9-Jan-06 3:33 
QuestionError Message Tables - who to implement them Pin
Sebastian Schneider9-Jan-06 2:47
Sebastian Schneider9-Jan-06 2:47 
QuestionRe: Error Message Tables - who to implement them Pin
David Crow9-Jan-06 3:03
David Crow9-Jan-06 3:03 
AnswerRe: Error Message Tables - who to implement them Pin
Rage9-Jan-06 6:18
professionalRage9-Jan-06 6:18 
AnswerRe: Error Message Tables - who to implement them Pin
Blake Miller9-Jan-06 7:09
Blake Miller9-Jan-06 7:09 
AnswerRe: Error Message Tables - who to implement them Pin
Sebastian Schneider9-Jan-06 20:11
Sebastian Schneider9-Jan-06 20:11 
QuestionHow to read from a text file? Pin
Amarelia9-Jan-06 2:14
Amarelia9-Jan-06 2:14 
AnswerRe: How to read from a text file? Pin
Chris Losinger9-Jan-06 2:18
professionalChris Losinger9-Jan-06 2:18 
AnswerRe: How to read from a text file? Pin
toxcct9-Jan-06 2:21
toxcct9-Jan-06 2:21 
QuestionRe: How to read from a text file? Pin
David Crow9-Jan-06 3:06
David Crow9-Jan-06 3:06 
QuestionPrinter Monitoring Pin
micutzu9-Jan-06 1:44
micutzu9-Jan-06 1:44 
AnswerRe: Printer Monitoring Pin
David Crow9-Jan-06 3:09
David Crow9-Jan-06 3:09 
GeneralRe: Printer Monitoring Pin
Dudi Avramov9-Jan-06 4:07
Dudi Avramov9-Jan-06 4:07 
GeneralRe: Printer Monitoring Pin
David Crow9-Jan-06 4:18
David Crow9-Jan-06 4:18 
GeneralRe: Printer Monitoring Pin
micutzu10-Jan-06 1:55
micutzu10-Jan-06 1:55 

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.