Click here to Skip to main content
15,918,125 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Modal dialog removes my App from Alt+Tab windows... Pin
insanely4202-Jul-03 5:42
insanely4202-Jul-03 5:42 
GeneralRe: Modal dialog removes my App from Alt+Tab windows... Pin
insanely4202-Jul-03 7:41
insanely4202-Jul-03 7:41 
GeneralRe: Modal dialog removes my App from Alt+Tab windows... Pin
insanely4202-Jul-03 7:43
insanely4202-Jul-03 7:43 
Generalcrystal reports in VC++ Pin
modular1-Jul-03 19:05
modular1-Jul-03 19:05 
GeneralShockwave Flash in dialog Pin
Andrew Allen1-Jul-03 18:59
Andrew Allen1-Jul-03 18:59 
GeneralRe: Shockwave Flash in dialog Pin
Mil102-Jul-03 0:40
Mil102-Jul-03 0:40 
GeneralRe: Shockwave Flash in dialog Pin
Andrew Allen2-Jul-03 5:32
Andrew Allen2-Jul-03 5:32 
GeneralAdvice Needed: MFC List Control Format Problem Pin
spaced_out1-Jul-03 18:10
spaced_out1-Jul-03 18:10 
This is my first post here, so I am going to see if there is anyone out there who can help me...

I am reading (converted excel) data into a List Control in Report format. The data consists of Numbers and characters. It looks like this coming in:

--- Data in ----

15.568 Mark/ Tompson/ SALES/ NYC/ 1553.61 1382.15 14.07
15.024 Sean/ Erickson/ SALES/ BOS/ 1378.05 1266.65 13.25
14.553 Adrian/ Washington/ MGT/ KAN/ 1304.61 1162.28 10.52
13.451 Jason/ Johnston/ DIST/ SEA/ 1200.14 1034.99 09.75

I added the "/" at the end of the Chars so that I could use the command below in the code to read them in. My problem is - in my List Control window I have a "|" symbol infront of the strings i.e.

-- List Control out ---

15.568 |Mark |Tompson |SALES |NYC 1553.61 1382.15 14.07
15.024 |Sean |Erickson |SALES |BOS 1378.05 1266.65 13.25
14.553 |Adrian |Washington |MGT |KAN 1304.61 1162.28 10.52
13.451 |Jason |Johnston |DIST |SEA 1200.14 1034.99 09.75

How can I get rid of the "|"? <---This is my problem.



--- Code ---
<br />
    double f1, f6, f7, f8,; // 4 temp variables for my numbers<br />
    char f2[20], f3[20], f4[20], f5[20];  // 4 temp variables for my strings up to <br />
                                          //twenty characters long each.<br />
    ifstream inf;<br />
    inf.open("Testdata.txt");    // this is where the data is stored<br />
<br />
	int total=0;<br />
<br />
	for (int i=1; i < 200; i++){   // reading 200 lines of data from the file (200 <br />
                                       // names.<br />
<br />
		inf >> f1;                 // read in the first number.<br />
    <br />
		inf.getline(f2,20,'/');    // read chars until the char '/' is found.<br />
		inf.getline(f3,20,'/');    // read chars until the char '/' is found.<br />
		inf.getline(f4,20,'/');    // read chars until the char '/' is found.<br />
		inf.getline(f5,20,'/');    // read chars until the char '/' is found.<br />
	<br />
		inf >> f6 >> f7 >> f8;     //read the other numbers.<br />
<br />
		total = total + i;<br />
<br />
		int nItem;<br />
	<br />
		Quality = f1;<br />
		_gcvt( Quality, precision2, str_Quality );   // convert the numbers to<br />
                                                             //strings.<br />
		nItem = m_List.InsertItem(0,str_Quality);    // insert into thefirst <br />
                                                             //column.<br />
		m_List.SetItemText(nItem,1,f2);              // insert the text as read.<br />
		m_List.SetItemText(nItem,2,f3);              // insert the text as read.<br />
		m_List.SetItemText(nItem,3,f4);              // insert the text as read.<br />
		m_List.SetItemText(nItem,4,f5);              // insert the text as read.<br />
		Sales = f6;<br />
		_gcvt( Sales, precision2, str_Sales );<br />
		m_List.SetItemText(nItem,5,str_Sales);<br />
		Evaluation = f7;<br />
		_gcvt( Evaluation, precision1, str_Evaluation );<br />
		m_List.SetItemText(nItem,6,str_Evaluation);<br />
		Performance = f8;<br />
		_gcvt( Performance, precision1, str_Performance );<br />
		m_List.SetItemText(nItem,7,str_Performance);<br />
		m_List.SetItemData(nItem,(DWORD)new CListViewInfo(Quality,f2,f3,f4,f5,Sales,Evaluation,Performance));      // here I send the actual <br />
//numbers (not converted to strings) to another source file that holds the actual data <br />
//for sorting and other routines that work.<br />
		<br />
	}<br />
<br />
    inf.close();<br />
    return 0;<br />
<br />
<br />
	return FALSE;  <br />
}<br />

---- End Code ---

Anyone who can help me ... thank you for your time.
GeneralRe: Advice Needed: MFC List Control Format Problem Pin
FlyingDancer1-Jul-03 18:55
FlyingDancer1-Jul-03 18:55 
GeneralRe: Advice Needed: MFC List Control Format Problem Pin
spaced_out1-Jul-03 19:20
spaced_out1-Jul-03 19:20 
GeneralRe: Advice Needed: MFC List Control Format Problem Pin
spaced_out1-Jul-03 19:45
spaced_out1-Jul-03 19:45 
GeneralRe: Advice Needed: MFC List Control Format Problem Pin
FlyingDancer1-Jul-03 22:00
FlyingDancer1-Jul-03 22:00 
GeneralA book or tutorial to help beginner... Pin
code-frog1-Jul-03 18:10
professionalcode-frog1-Jul-03 18:10 
GeneralRe: A book or tutorial to help beginner... Pin
Toni781-Jul-03 18:36
Toni781-Jul-03 18:36 
GeneralRe: A book or tutorial to help beginner... Pin
code-frog1-Jul-03 18:41
professionalcode-frog1-Jul-03 18:41 
GeneralRe: A book or tutorial to help beginner... Pin
Toni781-Jul-03 19:27
Toni781-Jul-03 19:27 
GeneralRe: A book or tutorial to help beginner... Pin
Jon Sagara1-Jul-03 21:50
Jon Sagara1-Jul-03 21:50 
Generalhtml in a dialog Pin
pranavamhari1-Jul-03 16:47
pranavamhari1-Jul-03 16:47 
GeneralRe: html in a dialog Pin
Scozturk1-Jul-03 20:11
professionalScozturk1-Jul-03 20:11 
GeneralRe: html in a dialog Pin
Joan M1-Jul-03 22:00
professionalJoan M1-Jul-03 22:00 
GeneralVS 6 IDE forgot what F1 does Pin
Chris Losinger1-Jul-03 16:41
professionalChris Losinger1-Jul-03 16:41 
GeneralRe: VS 6 IDE forgot what F1 does Pin
code-frog1-Jul-03 18:00
professionalcode-frog1-Jul-03 18:00 
QuestionHow do i switch between two Dialogs Pin
Member 4048131-Jul-03 16:33
Member 4048131-Jul-03 16:33 
AnswerRe: How do i switch between two Dialogs Pin
Toni781-Jul-03 18:30
Toni781-Jul-03 18:30 
GeneralHeap Class Pin
Ken Mazaika1-Jul-03 15:56
Ken Mazaika1-Jul-03 15:56 

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.