Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Why do some people use HeapAlloc instead of malloc? Pin
Andy Moore18-Aug-06 7:02
Andy Moore18-Aug-06 7:02 
GeneralRe: Why do some people use HeapAlloc instead of malloc? Pin
Chintoo72318-Aug-06 7:18
Chintoo72318-Aug-06 7:18 
GeneralRe: Why do some people use HeapAlloc instead of malloc? Pin
Andy Moore18-Aug-06 7:19
Andy Moore18-Aug-06 7:19 
AnswerRe: Why do some people use HeapAlloc instead of malloc? Pin
cmk18-Aug-06 11:31
cmk18-Aug-06 11:31 
QuestionCreating a Crystal report using a predifined template with vc++ 6.0 Pin
SabseJugs18-Aug-06 3:38
SabseJugs18-Aug-06 3:38 
Questionproblem with refresh button!! Pin
vijay_aroli18-Aug-06 3:34
vijay_aroli18-Aug-06 3:34 
AnswerRe: problem with refresh button!! Pin
Rage18-Aug-06 3:39
professionalRage18-Aug-06 3:39 
QuestionRe: problem with refresh button!! Pin
vijay_aroli18-Aug-06 5:02
vijay_aroli18-Aug-06 5:02 
hello sir!!i am new to MFC programming and i am developing an FTP client. the code is as shown below. i call the same code when i first connect to the FTP server and the code does the directory listing successfully. but when i call the same code to refresh the directory listing, the code fails.. just see where i am doing the mistake..


//delete all items in the listCtrl
m_cListDir.DeleteAllItems();
try
{ CString pStrptr;
CString str;
BOOL nRC = pConnect->GetCurrentDirectory(pStrptr);
pStrptr.Format("%s is the current directory", pStrptr);
MessageBox(pStrptr, " Info", MB_OK);


// use a file find object to enumerate files
CFtpFileFind finder1(pConnect);

pConnect->SetCurrentDirectory(pStrptr);
BOOL bWorking = finder1.FindFile( _T("*"));
if(bWorking)
{
int i = 0;
CString str;
CTime time;

while (bWorking)
{
bWorking = finder1.FindNextFile();
//display the file name, file size and last modified in a listctrl box
str.Format("%u byte(s)",finder1.GetLength());
m_cListDir.InsertItem (i,((LPCTSTR) finder1.GetFileTitle()));
m_cListDir.SetItemText(i,1,(LPCSTR)str);
finder1.GetLastAccessTime(time);
str.Format("%d-%d-%d",time.GetDay(),time.GetMonth(), time.GetYear());
m_cListDir.SetItemText(i++,2,(LPCSTR)str);
}
}
else
{
CString str;
MessageBox("'/' is empty", "Info", MB_ICONINFORMATION);
str.Format("Error : %s", GetLastError());
MessageBox(str, "Error",MB_ICONERROR);
}

}
catch (CException* pEx)
{
TCHAR sz[1024];
pEx->GetErrorMessage(sz, 1024);
MessageBox("Cannot retrive the server drive information","ERROR!",MB_ICONERROR);
pEx->Delete();
}



vijay aroli
QuestionRe: problem with refresh button!! Pin
David Crow18-Aug-06 6:33
David Crow18-Aug-06 6:33 
NewsRe: problem with refresh button!! Pin
vijay_aroli18-Aug-06 21:19
vijay_aroli18-Aug-06 21:19 
QuestionWord automation Pin
great_tommy18-Aug-06 3:31
great_tommy18-Aug-06 3:31 
AnswerRe: Word automation Pin
Rage18-Aug-06 3:38
professionalRage18-Aug-06 3:38 
GeneralRe: Word automation [modified] Pin
great_tommy18-Aug-06 3:50
great_tommy18-Aug-06 3:50 
GeneralRe: Word automation Pin
David Crow18-Aug-06 6:36
David Crow18-Aug-06 6:36 
QuestionHow Pin
nhoc_conxauxi18-Aug-06 2:58
nhoc_conxauxi18-Aug-06 2:58 
AnswerRe: How Pin
Hamid_RT18-Aug-06 19:35
Hamid_RT18-Aug-06 19:35 
QuestionHow to cut file Pin
nhoc_conxauxi18-Aug-06 2:49
nhoc_conxauxi18-Aug-06 2:49 
Questionhow can i read excel sheet using visual c++ MFC Pin
kamlesh987318-Aug-06 2:18
kamlesh987318-Aug-06 2:18 
AnswerRe: how can i read excel sheet using visual c++ MFC Pin
_AnsHUMAN_ 18-Aug-06 2:43
_AnsHUMAN_ 18-Aug-06 2:43 
QuestionRe: how can i read excel sheet using visual c++ MFC Pin
David Crow18-Aug-06 3:02
David Crow18-Aug-06 3:02 
AnswerRe: how can i read excel sheet using visual c++ MFC Pin
Hamid_RT18-Aug-06 3:04
Hamid_RT18-Aug-06 3:04 
GeneralRe: how can i read excel sheet using visual c++ MFC Pin
David Crow18-Aug-06 3:11
David Crow18-Aug-06 3:11 
GeneralRe: how can i read excel sheet using visual c++ MFC Pin
Hamid_RT18-Aug-06 7:07
Hamid_RT18-Aug-06 7:07 
AnswerRe: how can i read excel sheet using visual c++ MFC Pin
Waldermort18-Aug-06 3:56
Waldermort18-Aug-06 3:56 
QuestionSetItemText() Problem Pin
Kiran Pinjala18-Aug-06 1:58
Kiran Pinjala18-Aug-06 1:58 

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.