Click here to Skip to main content
16,005,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: EM_EXSTSEL & EM_SETCHARFORMAT problem ??? Pin
ForNow28-Jan-09 6:24
ForNow28-Jan-09 6:24 
QuestionTCHAR to const char*? Pin
sam_psycho28-Jan-09 1:47
sam_psycho28-Jan-09 1:47 
QuestionRe: TCHAR to const char*? Pin
«_Superman_»28-Jan-09 2:00
professional«_Superman_»28-Jan-09 2:00 
AnswerRe: TCHAR to const char*? Pin
sam_psycho28-Jan-09 2:08
sam_psycho28-Jan-09 2:08 
GeneralRe: TCHAR to const char*? Pin
Malli_S28-Jan-09 2:21
Malli_S28-Jan-09 2:21 
AnswerRe: TCHAR to const char*? Pin
CPallini28-Jan-09 2:21
mveCPallini28-Jan-09 2:21 
AnswerRe: TCHAR to const char*? Pin
Cedric Moonen28-Jan-09 2:40
Cedric Moonen28-Jan-09 2:40 
QuestionDisplay Format Text into a control Pin
manoharbalu28-Jan-09 0:43
manoharbalu28-Jan-09 0:43 
I am reading some text content from a .TXT file which I want to display in a Dialog control. I am reading the text using the following Code:

CFile *LogFile =new CFile;
LogFile->Open( GlbFileName, CFile::modeRead | CFile::shareDenyNone, NULL );
CArchive Archive(LogFile,CArchive::load);
oLogFileDisp.Serialize(Archive);
Archive.Close();
LogFile->Close();

m_LogfileContent.ResetContent(); //ListBox Control

for(int i=0;i<mLogFileDataArr.GetSize();i++)
{

CString strOneLine;
strOneLine=mLogFileDataArr[i];
m_LogfileContent.AddString(strOneLine); //ListBox Control

}
//ListBox Control
m_LogfileContent.SendMessage(WM_VSCROLL,MAKELPARAM(SB_BOTTOM,0),NULL);


The sample text content is as follows:

16:48:07 ALARM AIC201 FLUE GAS O2 3.00 10.00 20.51 High
16:48:07 ALARM FIC201 AIR MASTER 272.00 1000.00 0.00 Low
16:48:07 ALARM FIC311 PRM AIR MIL-A 26.00 100.00 0.00 Low
16:48:07 ALARM FIC312 PRM AIR MIL-B 26.00 100.00 0.00 Low
16:48:07 ALARM FIC313 PRM AIR MIL-C 26.00 100.00 0.00 Low
16:48:07 ALARM FIC314 PRM AIR MIL-D 26.00 100.00 0.00 Low
16:48:07 ALARM LIC101 CONDSR HOTWEL 600.00 1400.00 -95.84 Low
16:48:07 ALARM LIC102 DEAER STR TNK 1200.00 2800.00 -250.00 Low
16:48:07 ALARM LIC111 LP HTR 1 LVL 80.00 220.00 -50.00 Low
16:48:07 ALARM LIC112 LP HTR 2 LVL 80.00 220.00 -46.20 Low
16:48:07 ALARM LIC113 LP HTR 3 LVL 80.00 220.00 -46.18 Low



The Problem is the allignment of the numerical values are as straight as they appear above. They appear as follows:

16:48:07 ALARM AIC201 FLUE GAS O2 3.00 10.00 20.51 High
16:48:07 ALARM FIC201 AIR MASTER 272.00 000.00 0.00 Low
16:48:07 ALARM FIC311 PRM AIR MIL-A 26.00 100.00 0.00 Low
16:48:07 ALARM FIC312 PRM AIR MIL-B 26.00 100.00 0.00 Low
16:48:07 ALARM FIC313 PRM AIR MIL-C 26.00 100.00 0.00 Low
16:48:07 ALARM FIC314 PRM AIR MIL-D 26.00 100.00 0.00 Low
16:48:07 ALARM LIC101 CONDSR HOTWEL 600.00 1400.00 -95.84 Low
16:48:07 ALARM LIC102 DEAER STR TNK 1200.00 2800.00 -250.00 Low
16:48:07 ALARM LIC111 LP HTR 1 LVL 80.00 220.00 -50.00 Low




Please suggest me some ways of displaying them properly in a window. If anybody has some code samples provide me.
AnswerRe: Display Format Text into a control Pin
CPallini28-Jan-09 1:00
mveCPallini28-Jan-09 1:00 
GeneralRe: Display Format Text into a control Pin
manoharbalu28-Jan-09 1:24
manoharbalu28-Jan-09 1:24 
GeneralRe: Display Format Text into a control Pin
CPallini28-Jan-09 1:43
mveCPallini28-Jan-09 1:43 
GeneralRe: Display Format Text into a control Pin
manoharbalu28-Jan-09 1:47
manoharbalu28-Jan-09 1:47 
QuestionRe: Display Format Text into a control Pin
David Crow28-Jan-09 16:52
David Crow28-Jan-09 16:52 
QuestionCListBox / ListBox Pin
susanne128-Jan-09 0:07
susanne128-Jan-09 0:07 
AnswerRe: CListBox / ListBox Pin
Sarath C28-Jan-09 0:15
Sarath C28-Jan-09 0:15 
GeneralRe: CListBox / ListBox Pin
susanne128-Jan-09 0:25
susanne128-Jan-09 0:25 
GeneralRe: CListBox / ListBox Pin
Sarath C28-Jan-09 0:30
Sarath C28-Jan-09 0:30 
GeneralRe: CListBox / ListBox Pin
susanne128-Jan-09 0:45
susanne128-Jan-09 0:45 
GeneralRe: CListBox / ListBox Pin
Sarath C28-Jan-09 1:44
Sarath C28-Jan-09 1:44 
AnswerRe: CListBox / ListBox Pin
Naveen28-Jan-09 0:19
Naveen28-Jan-09 0:19 
GeneralRe: CListBox / ListBox Pin
susanne128-Jan-09 0:27
susanne128-Jan-09 0:27 
QuestionRe: CListBox / ListBox Pin
David Crow28-Jan-09 4:06
David Crow28-Jan-09 4:06 
AnswerRe: CListBox / ListBox Pin
susanne128-Jan-09 21:47
susanne128-Jan-09 21:47 
QuestionRe: CListBox / ListBox Pin
David Crow29-Jan-09 2:46
David Crow29-Jan-09 2:46 
AnswerRe: CListBox / ListBox Pin
susanne130-Jan-09 2:29
susanne130-Jan-09 2:29 

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.