Click here to Skip to main content
15,914,905 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: help me the application crashed!!! Pin
David Crow12-Feb-07 3:45
David Crow12-Feb-07 3:45 
QuestionEdit Box Question Pin
T.RATHA KRISHNAN12-Feb-07 1:38
T.RATHA KRISHNAN12-Feb-07 1:38 
AnswerRe: Edit Box Question Pin
_AnsHUMAN_ 12-Feb-07 1:56
_AnsHUMAN_ 12-Feb-07 1:56 
QuestionRe: Edit Box Question Pin
Roger Stoltz12-Feb-07 2:05
Roger Stoltz12-Feb-07 2:05 
AnswerRe: Edit Box Question Pin
Hamid_RT12-Feb-07 7:37
Hamid_RT12-Feb-07 7:37 
AnswerRe: Edit Box Question Pin
ldsdbomber13-Feb-07 4:00
ldsdbomber13-Feb-07 4:00 
QuestionGet Message handler for every new incoming Outlook Msg. Pin
Ganesh N. Paul12-Feb-07 1:38
Ganesh N. Paul12-Feb-07 1:38 
Questionhow to read each character in a file Pin
Siddam12-Feb-07 1:19
Siddam12-Feb-07 1:19 
Hi, all
In the program given below i am supposed to read a file irrespective of the size of the buffer.
->i am not able to implement the reading of the file character by character
and then mention the EOF.
->how am i supposed to dot that??? what are the necessary changes required?



void CReadDlg::OnRead()
{
char szFilters[]="MyType Files (*.txt)|*.txt|All Files (*.*)|*.*||";
CFileDialog fileDlg (true,"txt", "*.txt",OFN_FILEMUSTEXIST| OFN_HIDEREADONLY, szFilters, this);
fileDlg.DoModal();
// TODO: Add your control notification handler code here

UpdateData( TRUE );

HANDLE hFile;
DWORD dwBufSize=BUFSIZE;
BOOL bRet;
DWORD dwBytesRead;
char buffer[BUFSIZE] = {0};

hFile = CreateFile(fileDlg.GetPathName(),
GENERIC_READ,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);

bRet = ReadFile(hFile,
buffer,
BUFSIZE,
&dwBytesRead,
NULL);

/* while (!_eof(int fd))
{
buffer = */




m_ed = fileDlg.GetPathName();
m_text_ctrl.SetWindowText(buffer);
m_text_str = buffer;

UpdateData(false);
}

siddam
AnswerRe: how to read each character in a file Pin
David Crow12-Feb-07 2:17
David Crow12-Feb-07 2:17 
QuestionCreateProcess Pin
si_6912-Feb-07 1:13
si_6912-Feb-07 1:13 
QuestionRe: CreateProcess Pin
prasad_som12-Feb-07 1:17
prasad_som12-Feb-07 1:17 
AnswerRe: CreateProcess Pin
si_6912-Feb-07 1:41
si_6912-Feb-07 1:41 
AnswerRe: CreateProcess Pin
prasad_som12-Feb-07 1:44
prasad_som12-Feb-07 1:44 
GeneralRe: CreateProcess Pin
si_6912-Feb-07 1:49
si_6912-Feb-07 1:49 
GeneralRe: CreateProcess Pin
prasad_som12-Feb-07 2:09
prasad_som12-Feb-07 2:09 
GeneralRe: CreateProcess Pin
Hamid_RT12-Feb-07 7:32
Hamid_RT12-Feb-07 7:32 
Questionxml parser in vc++? Pin
$uresh $hanmugam12-Feb-07 0:49
$uresh $hanmugam12-Feb-07 0:49 
AnswerRe: xml parser in vc++? Pin
Cedric Moonen12-Feb-07 0:55
Cedric Moonen12-Feb-07 0:55 
AnswerRe: xml parser in vc++? Pin
jhwurmbach12-Feb-07 1:25
jhwurmbach12-Feb-07 1:25 
GeneralRe: xml parser in vc++? Pin
$uresh $hanmugam13-Feb-07 1:03
$uresh $hanmugam13-Feb-07 1:03 
GeneralRe: xml parser in vc++? Pin
jhwurmbach13-Feb-07 1:28
jhwurmbach13-Feb-07 1:28 
GeneralRe: xml parser in vc++? Pin
$uresh $hanmugam13-Feb-07 21:21
$uresh $hanmugam13-Feb-07 21:21 
GeneralRe: xml parser in vc++? Pin
jhwurmbach13-Feb-07 21:35
jhwurmbach13-Feb-07 21:35 
GeneralRe: xml parser in vc++? Pin
$uresh $hanmugam14-Feb-07 0:58
$uresh $hanmugam14-Feb-07 0:58 
GeneralRe: xml parser in vc++? Pin
jhwurmbach14-Feb-07 1:41
jhwurmbach14-Feb-07 1:41 

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.