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

C / C++ / MFC

 
GeneralRe: Problems with Htmlhelp API library Pin
Neville Franks16-Mar-03 9:20
Neville Franks16-Mar-03 9:20 
GeneralRe: Problems with Htmlhelp API library Pin
Dave Bryant16-Mar-03 9:22
Dave Bryant16-Mar-03 9:22 
GeneralInterdependent classes Pin
brandon187916-Mar-03 8:54
brandon187916-Mar-03 8:54 
GeneralRe: Interdependent classes Pin
Anonymous16-Mar-03 9:16
Anonymous16-Mar-03 9:16 
GeneralRe: Interdependent classes Pin
Dave Bryant16-Mar-03 9:17
Dave Bryant16-Mar-03 9:17 
GeneralRe: Interdependent classes Pin
Neville Franks16-Mar-03 9:19
Neville Franks16-Mar-03 9:19 
GeneralRe: Interdependent classes Pin
Jambolo16-Mar-03 14:07
Jambolo16-Mar-03 14:07 
GeneralUrgent! File I/O problem Pin
williamking16-Mar-03 7:37
williamking16-Mar-03 7:37 
Hi all,

I am using Embedded Visual C++ 3.0 and MFC dialog mode for implementation. Firstly, if I want to read one line each time from a .txt file in Pocket PC, can I use the following code?

char* data;
data = NULL;

fp=fopen("\\sip.txt","r");
while((!feof(fp)) && (fp != NULL))
{
fscanf(fp, "%s", data);
// Process the data here
}
fclose(fp);

Then, if I want to get the typed message from an edit box in a MFC dialog box and write/ append it into the file each time a line, should I do this?

CString asip;
GetDlgItemText(INPUT_ASIP, asip);

fp=fopen("\\sip.txt","a");
fprintf(fp, "%s\n", asip);
fclose(fp);

But I encounter a problem that the output file “sip” contains only the first character of the CString asip. How can I solve this?

It’s really urgent as I have to hand the program before 26/3/2003 so please kindly help me.

Many thanks!!!



Wil

GeneralICM and non-sRGB color spaces Pin
Jonathan Gilligan16-Mar-03 7:07
Jonathan Gilligan16-Mar-03 7:07 
GeneralRemove BOLD FONT in all caption of control??? :( Pin
_skidrow_vn_16-Mar-03 7:04
_skidrow_vn_16-Mar-03 7:04 
GeneralRe: Remove BOLD FONT in all caption of control??? :( Pin
Christian Graus16-Mar-03 9:47
protectorChristian Graus16-Mar-03 9:47 
Generalmodless dialog Pin
xstaci16-Mar-03 6:28
xstaci16-Mar-03 6:28 
GeneralRe: modless dialog Pin
Michael Dunn16-Mar-03 7:35
sitebuilderMichael Dunn16-Mar-03 7:35 
GeneralRe: modless dialog Pin
User 665816-Mar-03 7:44
User 665816-Mar-03 7:44 
GeneralRe: modless dialog Pin
xstaci16-Mar-03 7:57
xstaci16-Mar-03 7:57 
GeneralRe: modless dialog Pin
User 665816-Mar-03 8:07
User 665816-Mar-03 8:07 
GeneralRe: modless dialog Pin
xstaci16-Mar-03 9:29
xstaci16-Mar-03 9:29 
GeneralRe: modless dialog Pin
User 665816-Mar-03 10:27
User 665816-Mar-03 10:27 
Generalremove the close, maximize and minimize buttons from a dialog Pin
d_kilshtein16-Mar-03 5:58
d_kilshtein16-Mar-03 5:58 
GeneralRe: remove the close, maximize and minimize buttons from a dialog Pin
Abbas_Riazi16-Mar-03 7:01
professionalAbbas_Riazi16-Mar-03 7:01 
GeneralRe: remove the close, maximize and minimize buttons from a dialog Pin
Florin Ochiana16-Mar-03 11:36
Florin Ochiana16-Mar-03 11:36 
GeneralWindow Class name Pin
John-theKing16-Mar-03 5:06
John-theKing16-Mar-03 5:06 
GeneralRe: Window Class name Pin
João Paulo Figueira16-Mar-03 5:21
professionalJoão Paulo Figueira16-Mar-03 5:21 
Questionhow can i know if the sheet contain chart?? Pin
pnpfriend16-Mar-03 4:59
pnpfriend16-Mar-03 4:59 
GeneralA prog to say which files are in use... Pin
zamazula16-Mar-03 4:56
zamazula16-Mar-03 4:56 

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.