mocs
March 3rd, 2000, 09:24 AM
Ive got a problem while im trying to make a CString of som HTML-code and some variables, how do I make so it read it as text only and not as C++ code?
| // JP opened flex table
Click to See Complete Forum and Search --> : CString m_Output = m_Radbrytning + "", Error! mocs March 3rd, 2000, 09:24 AM Ive got a problem while im trying to make a CString of som HTML-code and some variables, how do I make so it read it as text only and not as C++ code? kornilow May 7th, 2000, 08:46 AM Call this member function to write formatted data to a CString in the same way that sprintf formats data into a C-style character array. This function formats and stores a series of characters and values in the CString. Each optional argument (if any) is converted and output according to the corresponding format specification in lpszFormat or from the string resource identified by nFormatID. The call will fail if the string object itself is offered as a parameter to Format. For example, the following code: CString str = "Some Data"; str.Format("%s%d", str, 123); // Attention: str is also used in the parameter list. will cause unpredictable results. If i help - rate. Christian May 10th, 2000, 07:53 AM Hi there. I think you´re struggling with doubledoublequotes. Just an example : CString temp; CString content; int i = 50; temp.format("%d",i); content = "<table width=\"" + temp + "%\">"; You have to group the doubleqoutes with a backslash if you want them to be taken into the CString object. Hope that helps. Best regards, Christian Pplease let me know if I was able to help you and rate my reply. codeguru.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved. |