Click here to Skip to main content
15,902,837 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to use "OnNewDocument" from cview or cmainframe class Pin
chaitannya_m4-Jul-07 9:18
chaitannya_m4-Jul-07 9:18 
AnswerRe: how to use "OnNewDocument" from cview or cmainframe class Pin
Mark Salsbery4-Jul-07 9:47
Mark Salsbery4-Jul-07 9:47 
GeneralRe: how to use "OnNewDocument" from cview or cmainframe class Pin
chaitannya_m4-Jul-07 16:21
chaitannya_m4-Jul-07 16:21 
GeneralRe: how to use "OnNewDocument" from cview or cmainframe class Pin
Mark Salsbery5-Jul-07 6:53
Mark Salsbery5-Jul-07 6:53 
QuestionC++ data structures Pin
tom groezer4-Jul-07 8:54
tom groezer4-Jul-07 8:54 
AnswerRe: C++ data structures Pin
Maximilien4-Jul-07 9:06
Maximilien4-Jul-07 9:06 
QuestionRe: C++ data structures Pin
David Crow5-Jul-07 3:15
David Crow5-Jul-07 3:15 
QuestionCString::Replace Problem [modified] Pin
lparsonson4-Jul-07 5:58
lparsonson4-Jul-07 5:58 
Hi all,

I'm trying to use the Replace function of the CString class, and it seems to be mostly fine, except it's ballsing up in one particular instance. I can't see what I'm doind different, but for some reason it doesn't like this:

CString PostCode;

m_PostCode.GetLine(0, PostCode.GetBuffer(m_PostCode.LineLength(0)), m_PostCode.LineLength(0));
PostCode.Replace("'", "''");


where m_PostCode is a member of the class this code is called from, being an instance of CEdit. I can't see anything that I'm doing differently to any other times I'm using the Replace function, but in this instance it just won't replace ' with ''.

Any ideas? I can't seem to find anything that suggests this is a known issue.

Thanks!

Louis.

Addendum:

I've noticed that it occurs with other CString/CEdit pairs like this, but if I copy the contents of the CString into a new CString, then run the Replace function of the new string it works fine. Am I missing something here?


-- modified at 12:05 Wednesday 4th July, 2007
AnswerRe: CString::Replace Problem Pin
Mark Salsbery4-Jul-07 7:02
Mark Salsbery4-Jul-07 7:02 
GeneralRe: CString::Replace Problem Pin
lparsonson5-Jul-07 4:54
lparsonson5-Jul-07 4:54 
QuestionCStatic drawing interrupted... Worker, UI Threads???? Pin
Greg Ellis4-Jul-07 5:41
Greg Ellis4-Jul-07 5:41 
AnswerRe: CStatic drawing interrupted... Worker, UI Threads???? Pin
Matthew Faithfull4-Jul-07 6:27
Matthew Faithfull4-Jul-07 6:27 
GeneralRe: CStatic drawing interrupted... Worker, UI Threads???? Pin
Greg Ellis4-Jul-07 6:35
Greg Ellis4-Jul-07 6:35 
GeneralRe: CStatic drawing interrupted... Worker, UI Threads???? Pin
Matthew Faithfull4-Jul-07 6:55
Matthew Faithfull4-Jul-07 6:55 
AnswerRe: CStatic drawing interrupted... Worker, UI Threads???? [modified] Pin
Mark Salsbery4-Jul-07 7:08
Mark Salsbery4-Jul-07 7:08 
QuestionOnSize Assertion Error Pin
sdancer754-Jul-07 5:11
sdancer754-Jul-07 5:11 
AnswerRe: OnSize Assertion Error Pin
Arman S.4-Jul-07 5:19
Arman S.4-Jul-07 5:19 
GeneralRe: OnSize Assertion Error Pin
sdancer754-Jul-07 22:56
sdancer754-Jul-07 22:56 
AnswerRe: OnSize Assertion Error Pin
Hamid_RT4-Jul-07 19:28
Hamid_RT4-Jul-07 19:28 
Questionneed your suggestion for data expression Pin
includeh104-Jul-07 4:56
includeh104-Jul-07 4:56 
QuestionRe: need your suggestion for data expression Pin
David Crow5-Jul-07 3:25
David Crow5-Jul-07 3:25 
Questionwriting to a port Pin
lovneet4-Jul-07 4:40
lovneet4-Jul-07 4:40 
AnswerRe: writing to a port Pin
CPallini4-Jul-07 4:48
mveCPallini4-Jul-07 4:48 
GeneralRe: writing to a port Pin
lovneet4-Jul-07 6:17
lovneet4-Jul-07 6:17 
GeneralRe: writing to a port Pin
CPallini4-Jul-07 9:07
mveCPallini4-Jul-07 9:07 

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.