Click here to Skip to main content
15,911,786 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralIE View Source Data Pin
Paul M Watt6-Aug-02 21:05
mentorPaul M Watt6-Aug-02 21:05 
GeneralRe: IE View Source Data Pin
Paul M Watt7-Aug-02 6:46
mentorPaul M Watt7-Aug-02 6:46 
GeneralRe: How about Socket program? Pin
Masaaki Onishi7-Aug-02 7:09
Masaaki Onishi7-Aug-02 7:09 
GeneralRe: How about Socket program? Pin
Paul M Watt7-Aug-02 19:20
mentorPaul M Watt7-Aug-02 19:20 
GeneralRe: IE View Source Data Pin
Todd Smith7-Aug-02 7:56
Todd Smith7-Aug-02 7:56 
GeneralRe: IE View Source Data Pin
Paul M Watt7-Aug-02 19:23
mentorPaul M Watt7-Aug-02 19:23 
GeneralList Control Pin
fdrimando6-Aug-02 20:21
fdrimando6-Aug-02 20:21 
GeneralRe: List Control Pin
RChin6-Aug-02 21:11
RChin6-Aug-02 21:11 
I'm afraid you'll have to do most of the work yourself. Read the text file (probably using CStdioFile, if using MFC), then display in your list control in the format that you require.

If this control is used very regularly in your project, you might consider creating a derived custom list control that does this automatically. But you still have to code the hard bits yourself.

A simple case would be like: (NB: This is UNTESTED and probably will not compile, but it
demonstrates my line of thinking Blush | :O .

<br />
CStdioFile myFile;   <br />
CString strLine;      // string buffer to read text<br />
<br />
int nIndex=0;<br />
if( myFile.Open( "C:\Text.txt", CFile::DenyNone | CFile::modeRead ) )<br />
{<br />
  while( myFile.ReadString(strLine) )<br />
  {<br />
    m_ListCtrl.InsertItem(nIndex++, strLine);<br />
  }<br />
  myFile.Close;<br />
}<br />


chin
GeneralRe: List Control Pin
fdrimando6-Aug-02 22:05
fdrimando6-Aug-02 22:05 
Question.Net not adding classes to dialogs? Pin
dazinith6-Aug-02 20:18
dazinith6-Aug-02 20:18 
AnswerRe: .Net not adding classes to dialogs? Pin
Nish Nishant6-Aug-02 20:54
sitebuilderNish Nishant6-Aug-02 20:54 
GeneralRe: .Net not adding classes to dialogs? Pin
dazinith7-Aug-02 3:21
dazinith7-Aug-02 3:21 
QuestionHow to convert a monochrome bitmap to color bitmap using VC++ Pin
haivh6-Aug-02 20:13
haivh6-Aug-02 20:13 
QuestionHow to write a funtion like ExtFloodFill Pin
haivh6-Aug-02 20:08
haivh6-Aug-02 20:08 
GeneralCProgressCtrl Color Pin
JennyP6-Aug-02 18:33
JennyP6-Aug-02 18:33 
GeneralRe: CProgressCtrl Color Pin
Shog96-Aug-02 19:42
sitebuilderShog96-Aug-02 19:42 
QuestionRTTI...? and MFC...? Pin
alex.barylski6-Aug-02 18:23
alex.barylski6-Aug-02 18:23 
AnswerRe: RTTI...? and MFC...? Pin
ttzzgg_807136-Aug-02 21:54
ttzzgg_807136-Aug-02 21:54 
GeneralRe: RTTI...? and MFC...? Pin
alex.barylski7-Aug-02 11:33
alex.barylski7-Aug-02 11:33 
AnswerRe: RTTI...? and MFC...? Pin
Tomasz Sowinski7-Aug-02 0:10
Tomasz Sowinski7-Aug-02 0:10 
GeneralRe: RTTI...? and MFC...? Pin
alex.barylski7-Aug-02 11:30
alex.barylski7-Aug-02 11:30 
GeneralRe: RTTI...? and MFC...? Pin
Tomasz Sowinski7-Aug-02 11:37
Tomasz Sowinski7-Aug-02 11:37 
GeneralRe: RTTI...? and MFC...? Pin
alex.barylski7-Aug-02 12:20
alex.barylski7-Aug-02 12:20 
GeneralRe: RTTI...? and MFC...? Pin
Tomasz Sowinski7-Aug-02 12:38
Tomasz Sowinski7-Aug-02 12:38 
AnswerRe: RTTI...? and MFC...? Pin
Neville Franks7-Aug-02 0:39
Neville Franks7-Aug-02 0:39 

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.