Click here to Skip to main content
15,927,344 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with SetLayeredWindowAttributes(...) Pin
Rui Lopes3-Apr-01 1:27
Rui Lopes3-Apr-01 1:27 
GeneralRe: Problem with SetLayeredWindowAttributes(...) Pin
3-Apr-01 1:40
suss3-Apr-01 1:40 
GeneralList view Pin
2-Apr-01 20:44
suss2-Apr-01 20:44 
QuestionNT service cause ADO's Open() function hang? Pin
2-Apr-01 18:26
suss2-Apr-01 18:26 
GeneralDirectX8 Texture Creation Pin
t_hamel2-Apr-01 17:24
t_hamel2-Apr-01 17:24 
GeneralDDE problems Pin
2-Apr-01 13:54
suss2-Apr-01 13:54 
GeneralCString Pin
RobJones2-Apr-01 12:25
RobJones2-Apr-01 12:25 
GeneralRe: CString Pin
Christian Graus2-Apr-01 13:08
protectorChristian Graus2-Apr-01 13:08 
I'm afraid that this just won't work, as you have found. To input special characters into a string, the character \ is used. This bit me a fair bit when I first started, because I always forgot that to put one slash into a string I needed to put two (\\). The first tells the compiler that you're about to specify a character that is otherwise unavailable, and the \ is unavailable because it is in charge of this task. So to put a new line into a string, to for example put two lines into an AfxMessageBox, it's \n\r ( newline/return combination ). And to put in quotes, it \"

Like this:

CString s = "\"this is a quote\"";
AfxMessageBox(s);

Christian

The content of this post is not necessarily the opinion of my yadda yadda yadda.

To understand recursion, we must first understand recursion.
GeneralRe: CString Pin
RobJones2-Apr-01 13:16
RobJones2-Apr-01 13:16 
GeneralRe: CString Pin
2-Apr-01 23:09
suss2-Apr-01 23:09 
GeneralProblems with m_pCtrlSite Pin
2-Apr-01 8:28
suss2-Apr-01 8:28 
GeneralATL: How can I create one ActiveX Control that could be pasted on Word ( for example...) Pin
2-Apr-01 7:58
suss2-Apr-01 7:58 
Generallittle help pleace :) Pin
nicson2-Apr-01 5:46
nicson2-Apr-01 5:46 
GeneralRe: little help pleace :) Pin
2-Apr-01 8:41
suss2-Apr-01 8:41 
GeneralRe: little help pleace :) Pin
Christian Graus2-Apr-01 13:09
protectorChristian Graus2-Apr-01 13:09 
GeneralRe: little help pleace :) Pin
2-Apr-01 21:23
suss2-Apr-01 21:23 
GeneralDagnamit - continuing file access nightmare.... Pin
Christian Graus2-Apr-01 3:21
protectorChristian Graus2-Apr-01 3:21 
GeneralRe: Dagnamit - continuing file access nightmare.... Pin
Christian Graus2-Apr-01 3:35
protectorChristian Graus2-Apr-01 3:35 
GeneralRe: Dagnamit - continuing file access nightmare.... Pin
l a u r e n2-Apr-01 6:37
l a u r e n2-Apr-01 6:37 
GeneralRe: Dagnamit - continuing file access nightmare.... Pin
Christian Graus2-Apr-01 13:11
protectorChristian Graus2-Apr-01 13:11 
GeneralInsert item on two lines in a List Control Pin
Gero2-Apr-01 2:50
Gero2-Apr-01 2:50 
QuestionHow is a differance in win98 and win2000 for image management? Pin
hahyojin1-Apr-01 22:29
hahyojin1-Apr-01 22:29 
GeneralConversion of a default file format to PDF. Pin
1-Apr-01 19:45
suss1-Apr-01 19:45 
GeneralRe: Conversion of a default file format to PDF. Pin
Kannan Kalyanaraman1-Apr-01 20:56
Kannan Kalyanaraman1-Apr-01 20:56 
QuestionHow to create a Button array ........ Pin
Vistac1-Apr-01 19:31
Vistac1-Apr-01 19:31 

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.