Click here to Skip to main content
15,920,576 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalget the current working directory Pin
shiva shankar17-Jun-04 0:50
shiva shankar17-Jun-04 0:50 
GeneralRe: get the current working directory Pin
Dudi Avramov17-Jun-04 0:56
Dudi Avramov17-Jun-04 0:56 
GeneralManipulate text file Pin
?!?17-Jun-04 0:47
?!?17-Jun-04 0:47 
GeneralRe: Manipulate text file Pin
toxcct17-Jun-04 1:00
toxcct17-Jun-04 1:00 
GeneralRe: Manipulate text file Pin
V.17-Jun-04 2:02
professionalV.17-Jun-04 2:02 
GeneralRe: Manipulate text file Pin
chauteen25-Aug-04 22:44
chauteen25-Aug-04 22:44 
GeneralRe: Manipulate text file Pin
V.25-Aug-04 23:23
professionalV.25-Aug-04 23:23 
Generalstill wnat to ask_Re: Manipulate text file Pin
chauteen26-Aug-04 18:15
chauteen26-Aug-04 18:15 
Thanks for your reply first.

For I am trying your way, to read the entire file and then write the whole data back.(the work I want to do is store 8 spin vlaue to a file, and update when the user click and change spin value.)
but I use a brute force way, for I don't know how to read data in CStringConfused | :confused:

I declare an BYTE array, called buffer[8], and in the dialog's init, I read in the file
fread( buffer, sizeof( BYTE ), 8, filespin );
and in the spin message, I add
<br />
fseek(filespin, 0, SEEK_SET);<br />
fprintf( filespin, "%s", buffer );<br />

I've also tried fwrite
<br />
fwrite( buffer, sizeof( BYTE ), 8, filespin );<br />

both failed
the output file will contain some strange code, like slash , camma or something.
I try to show the readin buffer text on a editbox, and it already contain a unexpected slash and the end.Confused | :confused:
It seems the read in have something wrong already, not to mention write data back.
Can you suggest me some smart or "correct" way to do?
Thank you very much.
chauteen
GeneralRe: still wnat to ask_Re: Manipulate text file Pin
V.26-Aug-04 20:47
professionalV.26-Aug-04 20:47 
GeneralRe: still wnat to ask_Re: Manipulate text file Pin
Anonymous2-Sep-04 0:47
Anonymous2-Sep-04 0:47 
GeneralRe: still wnat to ask_Re: Manipulate text file Pin
V.2-Sep-04 1:21
professionalV.2-Sep-04 1:21 
GeneralRe: still wnat to ask_Re: Manipulate text file Pin
chauteen2-Sep-04 16:22
chauteen2-Sep-04 16:22 
GeneralRe: still wnat to ask_Re: Manipulate text file Pin
V.2-Sep-04 20:59
professionalV.2-Sep-04 20:59 
QuestionAre there good WMI samples, articles, books ? Pin
vgrigor117-Jun-04 0:37
vgrigor117-Jun-04 0:37 
AnswerRe: Are there good WMI samples, articles, books ? Pin
Antony M Kancidrowski17-Jun-04 1:52
Antony M Kancidrowski17-Jun-04 1:52 
Generalbatch file for setting env variables Pin
John Oliver17-Jun-04 0:05
John Oliver17-Jun-04 0:05 
GeneralRe: batch file for setting env variables Pin
David Crow17-Jun-04 3:15
David Crow17-Jun-04 3:15 
GeneralRe: batch file for setting env variables Pin
John Oliver17-Jun-04 3:39
John Oliver17-Jun-04 3:39 
QuestionAny idea on this simple application? Pin
Nelson L.16-Jun-04 22:25
Nelson L.16-Jun-04 22:25 
AnswerRe: Any idea on this simple application? Pin
John Oliver17-Jun-04 0:08
John Oliver17-Jun-04 0:08 
GeneralON_COMMAND_RANGE problem Pin
ThatsAlok16-Jun-04 22:20
ThatsAlok16-Jun-04 22:20 
GeneralRe: ON_COMMAND_RANGE problem Pin
Cedric Moonen16-Jun-04 23:24
Cedric Moonen16-Jun-04 23:24 
Generaloperator- in Date Class Pin
foxele16-Jun-04 21:35
foxele16-Jun-04 21:35 
GeneralRe: operator- in Date Class Pin
V.16-Jun-04 22:00
professionalV.16-Jun-04 22:00 
GeneralRe: operator- in Date Class Pin
John Oliver17-Jun-04 2:12
John Oliver17-Jun-04 2:12 

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.