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

C / C++ / MFC

 
GeneralRe: Setting Children Nodes of Tree View Based on Parent Node Pin
Stuck At Zero8-Sep-08 5:25
Stuck At Zero8-Sep-08 5:25 
QuestionWhat message does a vertical CScrollBar send when it is moved? Pin
KellyR4-Sep-08 5:17
KellyR4-Sep-08 5:17 
AnswerRe: What message does a vertical CScrollBar send when it is moved? Pin
Mark Salsbery4-Sep-08 5:40
Mark Salsbery4-Sep-08 5:40 
GeneralRe: What message does a vertical CScrollBar send when it is moved? Pin
KellyR4-Sep-08 10:06
KellyR4-Sep-08 10:06 
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 
I just wanted to parse some data read into an CStringArray. The string to be parsed is got out of the array and is a CString type.
I have been trying to use strtok() to do this.

Typical string is "qwerty,123,,33,ABCD,,4545,"

I have another member variable (CString type array) to hold the parsed strings (as CString).

Typical string is "qwerty,123,,33,ABCD,,4545," sent to the GetDataItem procedure.

void CGenerate_FilesDlg::GetDataItem(CString str)
{
        // token is ","
	char *P1 = strtok((char*)(LPCTSTR)str, ",");
	char *P2 = strtok(NULL, "\0");

	//m_ParseParams[0].Format("%s",P1);
	//m_ParseParams[1].Format("%s",P2);
}


I get error when trying to put the parsed data into m_ParseParams[]
Error	3	error C2664: 'void ATL::CStringT<BaseType,StringTraits>::Format(const wchar_t *,...)' : cannot convert parameter 1 from 'const char [3]' to 'const wchar_t *'	c:\generate_filesdlg.cpp	225

I am having problems with the UNICODE.

Because I am using CStringArray I seem to be having problems using functions like strtok() in the VS 2005 environment.

What I am trying to do is so simple, but in a mess with types!

Andy.
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 
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 

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.