Click here to Skip to main content
15,887,399 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CFile %&% Pin
Mike Zinni6-May-03 3:15
Mike Zinni6-May-03 3:15 
GeneralRe: CFile %&% Pin
macmac386-May-03 3:24
macmac386-May-03 3:24 
GeneralRe: CFile %&% Pin
macmac386-May-03 3:54
macmac386-May-03 3:54 
GeneralRe: CFile %&% Pin
Mike Zinni6-May-03 4:10
Mike Zinni6-May-03 4:10 
GeneralRe: CFile %&% Pin
macmac386-May-03 4:45
macmac386-May-03 4:45 
GeneralRe: CFile %&% Pin
David Crow6-May-03 4:49
David Crow6-May-03 4:49 
GeneralRe: CFile %&% Pin
macmac387-May-03 3:56
macmac387-May-03 3:56 
GeneralRe: CFile %&% Pin
David Crow6-May-03 4:20
David Crow6-May-03 4:20 
CFileDialog dlg(FALSE);

dlg.DoModal();

CString fname = dlg.GetPathName();
const char* szBuffer = fname;
char s[128];

int i = lstrlen(szBuffer);

CFile f;
if (f.Open("F:\\test\\id.txt", CFile::modeWrite | CFile::modeCreate) == TRUE)
{
    try
    {
        f.Write(szBuffer, i);
    }
    catch (CFileException *e)
    {
        AfxMessageBox ("Error writing!");
        e->Delete();
    }

    f.Close();
}

if (f.Open("F:\\test\\id.txt", CFile::modeRead) == TRUE)
{
    try
    {
        f.Read(s, i);
    }
    catch (CFileException *e)
    {
        AfxMessageBox ("Error reading!");
        e->Delete();
    }
}

GeneralRe: CFile %&% Pin
Hans Ruck6-May-03 3:18
Hans Ruck6-May-03 3:18 
Generalstring substitution Pin
JensB6-May-03 2:49
JensB6-May-03 2:49 
GeneralRe: string substitution Pin
G. Steudtel6-May-03 4:02
G. Steudtel6-May-03 4:02 
QuestionHow to create a Virtual Serial Port with C++? Pin
d.schaeflein6-May-03 2:47
d.schaeflein6-May-03 2:47 
GeneralConvert "unsigned char[8]" to long Pin
Abebe6-May-03 2:42
Abebe6-May-03 2:42 
GeneralRe: Convert "unsigned char[8]" to long Pin
Xander806-May-03 2:52
Xander806-May-03 2:52 
GeneralRe: Convert "unsigned char[8]" to long Pin
Abebe8-May-03 4:55
Abebe8-May-03 4:55 
Generalshow web Page in a dialog box.. Pin
xxhimanshu6-May-03 2:39
xxhimanshu6-May-03 2:39 
GeneralRe: show web Page in a dialog box.. Pin
Joan M6-May-03 3:30
professionalJoan M6-May-03 3:30 
GeneralRe: show web Page in a dialog box.. Pin
Majid Shahabfar6-May-03 4:29
Majid Shahabfar6-May-03 4:29 
GeneralExtra Buttons on a SDI-Dialog Frame Pin
Harald Diel6-May-03 1:04
Harald Diel6-May-03 1:04 
GeneralRe: Extra Buttons on a SDI-Dialog Frame Pin
Neville Franks6-May-03 1:28
Neville Franks6-May-03 1:28 
GeneralRe: Extra Buttons on a SDI-Dialog Frame Pin
Roger Allen6-May-03 2:24
Roger Allen6-May-03 2:24 
Generalan easy unzip example Pin
includeh105-May-03 23:49
includeh105-May-03 23:49 
Questionchanging dialog of a dialog-based application at rutime with another dll's dialog? Pin
vcseeker5-May-03 21:21
vcseeker5-May-03 21:21 
AnswerRe: changing dialog of a dialog-based application at rutime with another dll's dialog? Pin
John R. Shaw6-May-03 7:20
John R. Shaw6-May-03 7:20 
GeneralThanks Pin
vcseeker6-May-03 17:52
vcseeker6-May-03 17:52 

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.