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

C / C++ / MFC

 
GeneralRe: How to get nChar ( keycode ) from TCHAR ? Pin
_Flaviu4-Apr-11 0:49
_Flaviu4-Apr-11 0:49 
GeneralRe: How to get nChar ( keycode ) from TCHAR ? Pin
CPallini4-Apr-11 1:51
mveCPallini4-Apr-11 1:51 
AnswerRe: How to get nChar ( keycode ) from TCHAR ? Pin
Stefan_Lang4-Apr-11 0:28
Stefan_Lang4-Apr-11 0:28 
GeneralRe: How to get nChar ( keycode ) from TCHAR ? Pin
_Flaviu4-Apr-11 0:33
_Flaviu4-Apr-11 0:33 
GeneralRe: How to get nChar ( keycode ) from TCHAR ? Pin
_Flaviu4-Apr-11 1:02
_Flaviu4-Apr-11 1:02 
GeneralRe: How to get nChar ( keycode ) from TCHAR ? Pin
Stefan_Lang4-Apr-11 22:34
Stefan_Lang4-Apr-11 22:34 
GeneralRe: How to get nChar ( keycode ) from TCHAR ? Pin
David Crow4-Apr-11 10:52
David Crow4-Apr-11 10:52 
GeneralRe: How to get nChar ( keycode ) from TCHAR ? Pin
Stefan_Lang4-Apr-11 22:27
Stefan_Lang4-Apr-11 22:27 
Thank you for reminding me why I hate working with MSDN classes. The term 'ReleaseBuffer' appears to be pretty clear on what it does, but like so many times, MS has its very own and unique understanding. Mad | :mad:

My error was to only check on GetBufferSetLength(): GetBufferSetLength at MSDN.

Unfortunately the explanation of true meaning of the effect of ReleaseBuffer after GetBufferSetLength() is ambiguous, although, based on the function name I didn't realize that. In fact, when I checked ReleaseBuffer just now, I found that it also isn't clear - that is, it isn't until you look at the code example. Or, more to the point, the comments added in there. Without that example I might in fact still question your assertion.

I'm still unsure whether it is required to call ReleaseBuffer() before accessing the CString variable; according to the documentation all it does is resize the buffer to the required size and, optionally, insert a terminating 0 character. The latter isn't required since GetLocaleInfo() already does it. The former isn't needed either, as the buffer was allocated with the correct size.

If there is any other hidden functionality of ReleaseBuffer(), I am not aware of it.
Questionproblem with print valu Pin
a1_shay3-Apr-11 19:58
a1_shay3-Apr-11 19:58 
AnswerRe: problem with print valu Pin
Niklas L3-Apr-11 21:22
Niklas L3-Apr-11 21:22 
GeneralRe: problem with print valu Pin
a1_shay3-Apr-11 21:39
a1_shay3-Apr-11 21:39 
GeneralRe: problem with print valu Pin
Niklas L3-Apr-11 22:18
Niklas L3-Apr-11 22:18 
AnswerRe: problem with print valu Pin
Stefan_Lang4-Apr-11 4:43
Stefan_Lang4-Apr-11 4:43 
GeneralRe: problem with print valu Pin
a1_shay4-Apr-11 5:23
a1_shay4-Apr-11 5:23 
Questionread function address Pin
so0_lanhlung23-Apr-11 4:57
so0_lanhlung23-Apr-11 4:57 
AnswerRe: read function address Pin
CPallini3-Apr-11 6:56
mveCPallini3-Apr-11 6:56 
GeneralRe: read function address Pin
so0_lanhlung23-Apr-11 7:04
so0_lanhlung23-Apr-11 7:04 
GeneralRe: read function address Pin
dasblinkenlight3-Apr-11 17:08
dasblinkenlight3-Apr-11 17:08 
Questioncall a function from another class Pin
dat198872-Apr-11 16:41
dat198872-Apr-11 16:41 
AnswerRe: call a function from another class Pin
«_Superman_»2-Apr-11 17:21
professional«_Superman_»2-Apr-11 17:21 
AnswerRe: call a function from another class Pin
Albert Holguin2-Apr-11 18:20
professionalAlbert Holguin2-Apr-11 18:20 
AnswerRe: call a function from another class Pin
David Crow3-Apr-11 13:56
David Crow3-Apr-11 13:56 
GeneralRe: call a function from another class Pin
dat198877-Apr-11 1:40
dat198877-Apr-11 1:40 
QuestionGit: Inserting a commit below root? Pin
FocusedWolf2-Apr-11 9:05
FocusedWolf2-Apr-11 9:05 
AnswerRe: Git: Inserting a commit below root? Pin
«_Superman_»2-Apr-11 17:30
professional«_Superman_»2-Apr-11 17:30 

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.