Click here to Skip to main content
15,904,653 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Catch file close event Pin
Galatei23-Nov-06 2:21
Galatei23-Nov-06 2:21 
QuestionDetect if a folder is locked Pin
Sudhir Mangla22-Nov-06 18:22
professionalSudhir Mangla22-Nov-06 18:22 
AnswerRe: Detect if a folder is locked Pin
Rajesh R Subramanian22-Nov-06 23:50
professionalRajesh R Subramanian22-Nov-06 23:50 
AnswerRe: Detect if a folder is locked Pin
Galatei23-Nov-06 2:34
Galatei23-Nov-06 2:34 
QuestionToolTip not working Pin
Parthi_Appu22-Nov-06 18:20
Parthi_Appu22-Nov-06 18:20 
AnswerRe: ToolTip not working Pin
Galatei23-Nov-06 2:40
Galatei23-Nov-06 2:40 
QuestionAdding functons to Interface Pin
Suresh H22-Nov-06 18:19
Suresh H22-Nov-06 18:19 
Questionproblem with free() Pin
cy163@hotmail.com22-Nov-06 17:25
cy163@hotmail.com22-Nov-06 17:25 
I am programming a MFC project using Visual C++. I encountered a problem with the following code snippet.
The code snippet could be compiled successfully.However, an error occurred when running the line
<br />
free(SampleDocName); <br />

in the following code snippet, free(SampleDocName) causes error if the line
<br />
SampleDocName[ SampleDocNam_Len  ] = '\0';<br />

is not used.
<br />
char * SampleDocName;<br />
int SampleDocNam_Len = m_EDITBOX_ExampleText.LineLength(0);<br />
SampleDocName = (char *) malloc(sizeof(char) * (SampleDocNam_Len+ 1 ) );<br />
m_EDITBOX_ExampleText.GetLine(0, SampleDocName );<br />
<br />
SampleDocName[ SampleDocNam_Len  ] = '\0';//<====<br />
<br />
<br />
free(SampleDocName); <br />



I do not why. Please help me.
AnswerRe: problem with free() Pin
Waldermort22-Nov-06 18:02
Waldermort22-Nov-06 18:02 
AnswerRe: problem with free() Pin
CPallini22-Nov-06 20:14
mveCPallini22-Nov-06 20:14 
QuestionTo hide the tab control Pin
see me22-Nov-06 17:08
see me22-Nov-06 17:08 
AnswerRe: To hide the tab control Pin
see me22-Nov-06 19:32
see me22-Nov-06 19:32 
QuestionHow to set the short file name? Pin
gydong2222-Nov-06 15:58
gydong2222-Nov-06 15:58 
AnswerRe: How to set the short file name? Pin
Christian Graus22-Nov-06 16:18
protectorChristian Graus22-Nov-06 16:18 
AnswerRe: How to set the short file name? Pin
CPallini22-Nov-06 20:02
mveCPallini22-Nov-06 20:02 
AnswerRe: How to set the short file name? Pin
Michael Dunn23-Nov-06 0:35
sitebuilderMichael Dunn23-Nov-06 0:35 
QuestionHow to "CreateDirectory" , "CopyFile" and "ChangeDirectory" in MFC Pin
Larry Mills Sr22-Nov-06 14:00
Larry Mills Sr22-Nov-06 14:00 
AnswerRe: How to "CreateDirectory" , "CopyFile" and "ChangeDirectory" in MFC Pin
Mark Salsbery22-Nov-06 14:12
Mark Salsbery22-Nov-06 14:12 
AnswerRe: How to "CreateDirectory" , "CopyFile" and "ChangeDirectory" in MFC Pin
Christian Graus22-Nov-06 16:18
protectorChristian Graus22-Nov-06 16:18 
GeneralRe: How to &quot;CreateDirectory&quot; , &quot;CopyFile&quot; and &quot;ChangeDirectory&quot; in MFC Pin
Galatei23-Nov-06 2:44
Galatei23-Nov-06 2:44 
GeneralRe: How to &quot;CreateDirectory&quot; , &quot;CopyFile&quot; and &quot;ChangeDirectory&quot; in MFC Pin
Larry Mills Sr23-Nov-06 14:44
Larry Mills Sr23-Nov-06 14:44 
Questioncreate additional child frame with different view? Pin
Franken22-Nov-06 11:32
Franken22-Nov-06 11:32 
QuestionCopyFile problem Pin
RoyceF22-Nov-06 10:53
RoyceF22-Nov-06 10:53 
QuestionRe: CopyFile problem Pin
CPallini22-Nov-06 11:05
mveCPallini22-Nov-06 11:05 
AnswerRe: CopyFile problem Pin
RoyceF22-Nov-06 11:52
RoyceF22-Nov-06 11:52 

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.