Click here to Skip to main content
16,011,374 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionupdate password Pin
Chandrasekharan P4-Sep-08 5:08
Chandrasekharan P4-Sep-08 5:08 
AnswerRe: update password Pin
Rajesh R Subramanian4-Sep-08 6:10
professionalRajesh R Subramanian4-Sep-08 6:10 
AnswerRe: update password Pin
David Crow4-Sep-08 7:04
David Crow4-Sep-08 7:04 
QuestionUsing strtok() in a UNICODE MFC Application Pin
Andy2024-Sep-08 4:54
Andy2024-Sep-08 4:54 
AnswerRe: Using strtok() in a UNICODE MFC Application Pin
Mark Salsbery4-Sep-08 5:17
Mark Salsbery4-Sep-08 5:17 
GeneralRe: Using strtok() in a UNICODE MFC Application Pin
Andy2024-Sep-08 10:07
Andy2024-Sep-08 10:07 
GeneralRe: Using strtok() in a UNICODE MFC Application Pin
David Crow4-Sep-08 10:53
David Crow4-Sep-08 10:53 
GeneralRe: Using strtok() in a UNICODE MFC Application Pin
Mark Salsbery4-Sep-08 10:56
Mark Salsbery4-Sep-08 10:56 
Andy202 wrote:
project options, header files and settings


MFC already uses the Generic-Text Mappings[^] so there's
no additional header files to worry about.

You can use the Configuration Properties/General/Character Set
project setting to choose Unicode or MBCS.


Andy202 wrote:
a few pointers as to use MFC C++ with UNICODE


Since MFC uses CString, I prefer to use CStrings for all my strings.

If a CRT string function is needed (because there's no equivalent functionality
in the CString class) then it's easiest to use generic-text Routine Mappings[^]
instead of using the char specific CRT string functions.
This keeps all the code buildable regardless of whether it's a
Unicode or MBCS build.


Andy202 wrote:
casting my way out of any problems


If you use the generic text stuff described above, you shouldn't
(very rarely at least) need casts. If the compiler complains, it
may be that you need to convert a string to the type expected.
Just remember Cstrings are wchar_t-based on Unicode builds, otherwise
they are char-based. If you need to force a CString to a specific type
regardless of the build configuration, then use the specific CStringA
or CStringW type.

Mark

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

Questionhow can i remove this error Pin
pc_dev4-Sep-08 4:27
pc_dev4-Sep-08 4:27 
AnswerRe: how can i remove this error [modified] Pin
Cedric Moonen4-Sep-08 4:28
Cedric Moonen4-Sep-08 4:28 
GeneralRe: how can i remove this error Pin
Roger Stoltz4-Sep-08 4:32
Roger Stoltz4-Sep-08 4:32 
GeneralRe: how can i remove this error Pin
Cedric Moonen4-Sep-08 4:39
Cedric Moonen4-Sep-08 4:39 
GeneralRe: how can i remove this error Pin
Roger Stoltz4-Sep-08 4:41
Roger Stoltz4-Sep-08 4:41 
AnswerRe: how can i remove this error Pin
Roger Stoltz4-Sep-08 4:35
Roger Stoltz4-Sep-08 4:35 
GeneralRe: how can i remove this error Pin
Cedric Moonen4-Sep-08 4:40
Cedric Moonen4-Sep-08 4:40 
AnswerRe: how can i remove this error Pin
Roger Stoltz4-Sep-08 4:58
Roger Stoltz4-Sep-08 4:58 
AnswerRe: how can i remove this error Pin
vikas amin4-Sep-08 13:47
vikas amin4-Sep-08 13:47 
QuestionProgress Bar Pin
Dhiraj kumar Saini4-Sep-08 3:29
Dhiraj kumar Saini4-Sep-08 3:29 
QuestionRe: Progress Bar Pin
David Crow4-Sep-08 3:44
David Crow4-Sep-08 3:44 
AnswerRe: Progress Bar Pin
pc_dev4-Sep-08 4:41
pc_dev4-Sep-08 4:41 
GeneralRe: Progress Bar Pin
Dhiraj kumar Saini4-Sep-08 19:01
Dhiraj kumar Saini4-Sep-08 19:01 
QuestionHANDLE in MFC Pin
manju23reddy4-Sep-08 3:05
manju23reddy4-Sep-08 3:05 
AnswerRe: HANDLE in MFC Pin
toxcct4-Sep-08 3:13
toxcct4-Sep-08 3:13 
AnswerRe: HANDLE in MFC Pin
kapardhi4-Sep-08 3:14
kapardhi4-Sep-08 3:14 
AnswerRe: HANDLE in MFC Pin
Roger Stoltz4-Sep-08 3:20
Roger Stoltz4-Sep-08 3:20 

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.