Click here to Skip to main content
15,906,766 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: I need to copy (CTRL+C) a web page... C++ Pin
Nitheesh George18-Apr-11 18:27
Nitheesh George18-Apr-11 18:27 
GeneralRe: I need to copy (CTRL+C) a web page... C++ Pin
Ram Shmider19-Apr-11 20:18
Ram Shmider19-Apr-11 20:18 
QuestionHow can I solve those errors? Pin
Abder_Rahman18-Apr-11 0:26
Abder_Rahman18-Apr-11 0:26 
AnswerRe: How can I solve those errors? Pin
Richard MacCutchan18-Apr-11 0:52
mveRichard MacCutchan18-Apr-11 0:52 
GeneralRe: How can I solve those errors? Pin
Abder_Rahman18-Apr-11 23:52
Abder_Rahman18-Apr-11 23:52 
QuestionApplication crashing while using cablib.dll Pin
tomydevasia18-Apr-11 0:05
tomydevasia18-Apr-11 0:05 
AnswerRe: Application crashing while using cablib.dll Pin
Richard MacCutchan18-Apr-11 0:48
mveRichard MacCutchan18-Apr-11 0:48 
Questionhow to drag and drop image in listview control using mfc Pin
rajniyadav1a17-Apr-11 21:29
rajniyadav1a17-Apr-11 21:29 
AnswerRe: how to drag and drop image in listview control using mfc Pin
Niklas L18-Apr-11 5:51
Niklas L18-Apr-11 5:51 
QuestionUninstalling the application completely. Pin
pix_programmer17-Apr-11 20:50
pix_programmer17-Apr-11 20:50 
AnswerRe: Uninstalling the application completely. Pin
pix_programmer20-Apr-11 3:29
pix_programmer20-Apr-11 3:29 
QuestionsetWindowLong for more than One window Pin
002comp17-Apr-11 20:19
002comp17-Apr-11 20:19 
AnswerRe: setWindowLong for more than One window Pin
Richard MacCutchan17-Apr-11 22:05
mveRichard MacCutchan17-Apr-11 22:05 
GeneralRe: setWindowLong for more than One window Pin
002comp17-Apr-11 22:31
002comp17-Apr-11 22:31 
GeneralRe: setWindowLong for more than One window Pin
Richard MacCutchan17-Apr-11 23:00
mveRichard MacCutchan17-Apr-11 23:00 
QuestionHow to get String from ".txt" file and transfer to float Pin
camuoi28817-Apr-11 17:04
camuoi28817-Apr-11 17:04 
I want to get String as : "6.591E+02" from text file,and transfer it to float.My file have a form:
STT x y
1 6.591E+02 8.575E+02
2 7.350E+02 9.289E+02
3 7.234E+02 1.078E+03
4 6.844E+02 1.191E+03
5 5.951E+02 1.306E+03
6 4.125E+02 1.259E+03
my code as:
CString m_file;<br />
UINT nOpenFlags;<br />
nOpenFlags = CFile ::modeRead|CFile ::modeCreate;<br />
UpdateData(TRUE);<br />
CFileDialog dlg(TRUE,0,0,OFN_HIDEREADONLY | OFN_FILEMUSTEXIST,"All Files (*.txt)|*.txt||");<br />
if (dlg.DoModal()==IDCANCEL) return;<br />
m_file=dlg.GetPathName();<br />
<br />
int i,count,j;<br />
count =0;<br />
UINT nOpenFlags1;<br />
CStdioFile Inputfile;<br />
CFileException File;<br />
CString s;<br />
tamthoi="";<br />
nOpenFlags1=CFile ::modeRead;<br />
if(!Inputfile.Open(m_file,nOpenFlags1,&File))<br />
    {<br />
        File.ReportError();<br />
    }<br />
while(Inputfile.ReadString(s))<br />
{<br />
    count++;<br />
    tamthoi+=s;<br />
}<br />
Inputfile.Close();<br />
    count_line=count;<br />
    if(!Inputfile.Open(m_file,nOpenFlags1,&File))<br />
        {<br />
            File.ReportError();<br />
        }<br />
    m_Listfile.ResetContent();<br />
    for(i=0;i<count_line;i++)<br />
        {<br />
        Inputfile.ReadString(s);<br />
        m_Listfile.AddString(s);<br />
        }<br />
    Inputfile.Close();<br />
    CStringArray cx,cy;<br />
    cx.SetSize(count_line);<br />
    cy.SetSize(count_line);<br />
    x= new float[count_line];<br />
    y= new float [count_line];<br />
    for (i=1;i<count_line;i++)<br />
    {<br />
        int c;<br />
        char *kytux,*kytuy;<br />
        c=tamthoi.Find("    ",21*(i-1)+9);<br />
        cx[i]=tamthoi.Mid(c+1,9);<br />
        cy[i]=tamthoi.Mid(c+6,9);<br />
        sscanf(cx[i],"&c",&kytux);<br />
        sscanf(cx[i],"&c",&kytuy);<br />
        x[i]=atof(kytux);<br />
        y[i]=atof(kytuy);<br />
    }<br />
    UpdateData(FALSE);

AnswerRe: How to get String from ".txt" file and transfer to float Pin
«_Superman_»17-Apr-11 18:50
professional«_Superman_»17-Apr-11 18:50 
GeneralRe: How to get String from ".txt" file and transfer to float Pin
camuoi28817-Apr-11 20:00
camuoi28817-Apr-11 20:00 
GeneralRe: How to get String from ".txt" file and transfer to float Pin
Richard MacCutchan17-Apr-11 22:02
mveRichard MacCutchan17-Apr-11 22:02 
GeneralRe: How to get String from ".txt" file and transfer to float Pin
David Crow18-Apr-11 3:09
David Crow18-Apr-11 3:09 
QuestionPrint with a PDF printer Pin
Gagnon Claude17-Apr-11 7:01
Gagnon Claude17-Apr-11 7:01 
QuestionProxy Type - by code Pin
Ram Shmider16-Apr-11 21:54
Ram Shmider16-Apr-11 21:54 
QuestionCombining if statements Pin
Cyclone_S16-Apr-11 9:16
Cyclone_S16-Apr-11 9:16 
AnswerRe: Combining if statements Pin
Albert Holguin16-Apr-11 17:30
professionalAlbert Holguin16-Apr-11 17:30 
GeneralRe: Combining if statements Pin
Cyclone_S20-Apr-11 9:14
Cyclone_S20-Apr-11 9:14 

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.