Click here to Skip to main content
15,887,214 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: How to associate CMap key value to CComboBox Pin
Cool_Dev27-Sep-10 18:53
Cool_Dev27-Sep-10 18:53 
GeneralRe: How to associate CMap key value to CComboBox Pin
ptr_Electron27-Sep-10 22:14
ptr_Electron27-Sep-10 22:14 
GeneralRe: How to associate CMap key value to CComboBox Pin
Cool_Dev27-Sep-10 22:36
Cool_Dev27-Sep-10 22:36 
GeneralRe: How to associate CMap key value to CComboBox Pin
ptr_Electron28-Sep-10 0:31
ptr_Electron28-Sep-10 0:31 
GeneralRe: How to associate CMap key value to CComboBox Pin
ptr_Electron28-Sep-10 1:53
ptr_Electron28-Sep-10 1:53 
GeneralRe: How to associate CMap key value to CComboBox Pin
Cool_Dev28-Sep-10 2:12
Cool_Dev28-Sep-10 2:12 
GeneralRe: How to associate CMap key value to CComboBox Pin
ptr_Electron28-Sep-10 2:24
ptr_Electron28-Sep-10 2:24 
QuestionCFile Insert not Write... Pin
loid grey manuel26-Sep-10 22:17
loid grey manuel26-Sep-10 22:17 
hello, i'm having a hard time figuring out how to insert a character/string on my CFile,

i have no problem writing the character set at the end or at the beginning of the file, but when i try to add it in between, it overwrites the file.

Example:

i have "JON SMITH" on my file, when i try to insert "H" at index 2, it should look like this "JOHN SMITH", but what happens is this "JOH SMITH" it overwrites, it does not insert.

here is my code

//write to file	
	CString txtInsert;
	m_txtInsert.GetWindowText(txtInsert);
	int szSize = txtInsert.GetLength();

	//create the file
	if (!cfile_object.Open(l_ExePath + "Logs\\cfile_example.txt", CFile::modeWrite))
	{
		AfxMessageBox(_T("Cannot Open File for Reading!\nPls. Check Directory of File!"));
	}
	else
	{
	cfile_object.Seek( 2, CFile::begin );
    cfile_object.Write(txtInsert, szSize);
	//close file
	cfile_object.Close();


i needed to type "H SMITH" just to get the result "JOHN SMITH" but all i want is the insert the character "H" on the right place..

any help or hints will be much appreciated, thankyou
AnswerRe: CFile Insert not Write... Pin
Richard MacCutchan26-Sep-10 22:59
mveRichard MacCutchan26-Sep-10 22:59 
GeneralRe: CFile Insert not Write... [RESOLVED] Pin
loid grey manuel27-Sep-10 15:56
loid grey manuel27-Sep-10 15:56 
GeneralRe: CFile Insert not Write... [RESOLVED] Pin
Richard MacCutchan27-Sep-10 21:48
mveRichard MacCutchan27-Sep-10 21:48 
GeneralRe: CFile Insert and realtime Sorting ... Pin
loid grey manuel27-Sep-10 22:32
loid grey manuel27-Sep-10 22:32 
GeneralRe: CFile Insert and realtime Sorting ... Pin
Richard MacCutchan28-Sep-10 2:16
mveRichard MacCutchan28-Sep-10 2:16 
QuestionHttpOpenRequest failed in IE9 Pin
am 200922-Sep-10 20:25
am 200922-Sep-10 20:25 
AnswerRe: HttpOpenRequest failed in IE9 Pin
Garth J Lancaster22-Sep-10 20:49
professionalGarth J Lancaster22-Sep-10 20:49 
GeneralRe: HttpOpenRequest failed in IE9 Pin
am 200922-Sep-10 21:01
am 200922-Sep-10 21:01 
GeneralRe: HttpOpenRequest failed in IE9 Pin
Garth J Lancaster22-Sep-10 23:59
professionalGarth J Lancaster22-Sep-10 23:59 
GeneralRe: HttpOpenRequest failed in IE9 Pin
am 200923-Sep-10 17:44
am 200923-Sep-10 17:44 
GeneralRe: HttpOpenRequest failed in IE9 Pin
Garth J Lancaster23-Sep-10 17:46
professionalGarth J Lancaster23-Sep-10 17:46 
GeneralRe: HttpOpenRequest failed in IE9 Pin
am 200923-Sep-10 18:45
am 200923-Sep-10 18:45 
QuestionAny news for native c++ delegates? Pin
federico.strati22-Sep-10 4:52
federico.strati22-Sep-10 4:52 
AnswerRe: Any news for native c++ delegates? Pin
«_Superman_»22-Sep-10 20:21
professional«_Superman_»22-Sep-10 20:21 
GeneralRe: Any news for native c++ delegates? Pin
federico.strati22-Sep-10 22:50
federico.strati22-Sep-10 22:50 
QuestionResizing a window Pin
Craig Longman21-Sep-10 11:04
Craig Longman21-Sep-10 11:04 
AnswerRe: Resizing a window Pin
Craig Longman22-Sep-10 18:02
Craig Longman22-Sep-10 18:02 

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.