Click here to Skip to main content
15,892,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Working on jpg, png, tiff image types in VC++ Pin
Prakash Nadar30-Sep-05 22:31
Prakash Nadar30-Sep-05 22:31 
GeneralRe: Working on jpg, png, tiff image types in VC++ Pin
Joseph Abraham1-Oct-05 2:42
Joseph Abraham1-Oct-05 2:42 
AnswerRe: Working on jpg, png, tiff image types in VC++ Pin
puma-xu9-Oct-05 21:27
puma-xu9-Oct-05 21:27 
QuestionGet Process Name Pin
.NetRams30-Sep-05 19:17
.NetRams30-Sep-05 19:17 
AnswerRe: Get Process Name Pin
ThatsAlok30-Sep-05 19:38
ThatsAlok30-Sep-05 19:38 
GeneralRe: Get Process Name Pin
.NetRams30-Sep-05 20:50
.NetRams30-Sep-05 20:50 
Questionstring manipulation question Pin
nm_11430-Sep-05 16:26
nm_11430-Sep-05 16:26 
AnswerRe: string manipulation question Pin
Jose Lamas Rios30-Sep-05 17:28
Jose Lamas Rios30-Sep-05 17:28 
pch++ can be used for WCHAR* or, if you know the string is using a code page in which there are no multi-byte chars (e.g., English, Spanish, French), for char* too.

CharNext or _tcsinc are used when you want to write code that can be used, whithout changes, either for SBCS, MBCS, or Unicode builds. For example, the following code:
_TCHAR buffer[] = _T("This is a test");
int nLen = 0;
for (const _TCHAR* pch = buffer; *pch; pch = _tcsinc(pch))
{
   nLen++;
}

gets expanded as follows:
// SBCS (when neither _MBCS nor _UNICODE are defined)
char buffer[] = "This is a test";
int nLen = 0;
for (const char* pch = buffer; *pch; pch = _strinc(pch))
{
   nLen++;
}

// UNICODE (when _UNICODE is defined)
wchar_t buffer[] = L"This is a test";
int nLen = 0;
for (const wchar_t* pch = buffer; *pch; pch = _wcsinc(pch))
{
   nLen++;
}

// MBCS (when _MBCS is defined)
char buffer[] = "This is a test";
int nLen = 0;
for (const char* pch = buffer; *pch; pch = _mbsinc(pch))
{
   nLen++;
}

See also: A Sample Generic-Text Program[^]

--
jlr
http://jlamas.blogspot.com/[^]
GeneralRe: string manipulation question Pin
nm_1141-Oct-05 13:10
nm_1141-Oct-05 13:10 
Questionscalar deleting destructor Pin
valerie9930-Sep-05 11:05
valerie9930-Sep-05 11:05 
Answerthe call stack when it crashs Pin
valerie9930-Sep-05 11:44
valerie9930-Sep-05 11:44 
AnswerRe: scalar deleting destructor Pin
Prakash Nadar30-Sep-05 17:29
Prakash Nadar30-Sep-05 17:29 
QuestionNetwork connection properties window Pin
j1390130-Sep-05 8:48
j1390130-Sep-05 8:48 
AnswerRe: Network connection properties window Pin
Prakash Nadar30-Sep-05 22:43
Prakash Nadar30-Sep-05 22:43 
QuestionMFC SDI help Pin
bugDanny30-Sep-05 7:34
bugDanny30-Sep-05 7:34 
AnswerRe: MFC SDI help Pin
David Crow30-Sep-05 7:41
David Crow30-Sep-05 7:41 
AnswerRe: MFC SDI help Pin
Neelesh K J Jain30-Sep-05 18:15
Neelesh K J Jain30-Sep-05 18:15 
GeneralRe: MFC SDI help Pin
bugDanny1-Oct-05 9:57
bugDanny1-Oct-05 9:57 
QuestionHow to get CTreeCtrl to show selection after loss of focus Pin
Ian Bowler30-Sep-05 7:04
Ian Bowler30-Sep-05 7:04 
AnswerRe: How to get CTreeCtrl to show selection after loss of focus Pin
PJ Arends30-Sep-05 7:21
professionalPJ Arends30-Sep-05 7:21 
GeneralRe: How to get CTreeCtrl to show selection after loss of focus Pin
Ian Bowler30-Sep-05 7:26
Ian Bowler30-Sep-05 7:26 
AnswerRe: How to get CTreeCtrl to show selection after loss of focus Pin
Neelesh K J Jain30-Sep-05 7:25
Neelesh K J Jain30-Sep-05 7:25 
GeneralRe: How to get CTreeCtrl to show selection after loss of focus Pin
Ian Bowler30-Sep-05 7:32
Ian Bowler30-Sep-05 7:32 
GeneralRe: How to get CTreeCtrl to show selection after loss of focus Pin
Neelesh K J Jain30-Sep-05 18:22
Neelesh K J Jain30-Sep-05 18:22 
Questionlaunching application from html page Pin
vyjesh30-Sep-05 4:03
vyjesh30-Sep-05 4:03 

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.