Click here to Skip to main content
15,919,358 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: anothere thread call UpdateAllViews() Pin
John R. Shaw5-Nov-04 12:17
John R. Shaw5-Nov-04 12:17 
GeneralRe: anothere thread call UpdateAllViews() Pin
LeeeNN5-Nov-04 12:35
LeeeNN5-Nov-04 12:35 
GeneralRe: anothere thread call UpdateAllViews() Pin
John R. Shaw5-Nov-04 14:04
John R. Shaw5-Nov-04 14:04 
GeneralRe: anothere thread call UpdateAllViews() Pin
Neville Franks6-Nov-04 0:09
Neville Franks6-Nov-04 0:09 
GeneralRe: anothere thread call UpdateAllViews() Pin
LeeeNN8-Nov-04 6:29
LeeeNN8-Nov-04 6:29 
GeneralLinking In Help File Pin
Grahamfff5-Nov-04 10:45
Grahamfff5-Nov-04 10:45 
GeneralDeleting a character in a text file Pin
Nikhil Wason5-Nov-04 9:29
Nikhil Wason5-Nov-04 9:29 
GeneralRe: Deleting a character in a text file Pin
John R. Shaw5-Nov-04 9:50
John R. Shaw5-Nov-04 9:50 
1) Open (for read/write) the file read it into a CString or std:string, find the character you want to delete and then use the appropriate function call to delete it from the string, finaly move to the beginning of the file and write the string back to the file.

2) You could also just allocate a buffer larg enought to hold the entire file (+1, buffer must end w/NULL), read the data into the buffer, find the character, then use memmove function to delete it, finaly writing back to the file.

3) You could also read it into a large buffer then write it back to the file while skip the character that you want deleted.

4) (worst way of all - this is realy bad)
Open a tempory file and the origanal, read 1 character at a time from the origanal file and write it to the tempory file, when you find the character you want to delete then just do not copy it to the temporay file. Once you reach the end of the file you could copy the tempory file back to the origanal (or delete the origanal and rename the temporary with the origanal name).

Use your imagination, there are more ways to skin this cat than I count. But one way that you cann't do it is by inserting anouther character into the data stream.

Good Luck!

INTP
Questioncan i find out free disk space on a computer on network??? Pin
venadder5-Nov-04 8:35
venadder5-Nov-04 8:35 
GeneralDrawing in a Dialog Pin
sir kaber5-Nov-04 7:47
sir kaber5-Nov-04 7:47 
GeneralRe: Drawing in a Dialog Pin
John R. Shaw5-Nov-04 9:30
John R. Shaw5-Nov-04 9:30 
GeneralRe: Drawing in a Dialog Pin
Anonymous5-Nov-04 11:36
Anonymous5-Nov-04 11:36 
GeneralRe: Drawing in a Dialog Pin
John R. Shaw5-Nov-04 12:34
John R. Shaw5-Nov-04 12:34 
GeneralListView_SortItems Pin
Anonymous5-Nov-04 7:03
Anonymous5-Nov-04 7:03 
General(help) Unicode and text files Pin
necroleak5-Nov-04 6:47
sussnecroleak5-Nov-04 6:47 
GeneralRe: (help) Unicode and text files Pin
peterchen5-Nov-04 23:56
peterchen5-Nov-04 23:56 
GeneralRemoving signature from a dll Pin
wrykyn5-Nov-04 6:03
wrykyn5-Nov-04 6:03 
GeneralOwner Drawn Button Pin
Timothy Grabrian5-Nov-04 5:47
professionalTimothy Grabrian5-Nov-04 5:47 
GeneralRe: Owner Drawn Button Pin
Antony M Kancidrowski5-Nov-04 6:12
Antony M Kancidrowski5-Nov-04 6:12 
GeneralRe: Owner Drawn Button Pin
Timothy Grabrian5-Nov-04 7:12
professionalTimothy Grabrian5-Nov-04 7:12 
GeneralRe: Owner Drawn Button Pin
John R. Shaw5-Nov-04 10:30
John R. Shaw5-Nov-04 10:30 
GeneralContext menu on system tray icon Pin
lillah5-Nov-04 4:31
lillah5-Nov-04 4:31 
GeneralRe: Context menu on system tray icon Pin
lillah6-Nov-04 5:28
lillah6-Nov-04 5:28 
GeneralRe: Context menu on system tray icon Pin
ThatsAlok6-Nov-04 18:12
ThatsAlok6-Nov-04 18:12 
GeneralRe: Context menu on system tray icon Pin
lillah8-Nov-04 6:13
lillah8-Nov-04 6:13 

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.