比如,我有这样一个句子,比较长:  MessageBox(0, PChar('Some programs try to close me by sending WM_CLOSE.'),PChar(Title), MB_OK);我想把它变成:        MessageBox(0, PChar('Some programs try to close me
                      by sending WM_CLOSE.'),PChar(), MB_OK);可是这样不能编译,请问该怎么办?

解决方案 »

  1.   


    MessageBox(0, PChar('Some programs try to close me '+
                        'by sending WM_CLOSE.'),PChar(), MB_OK); 
      

  2.   

    MessageBox(0, 'Some programs try to close me'+
                          'by sending WM_CLOSE','', MB_OK);
      

  3.   

    MessageBox(0, PChar('Some programs try to close me' +  
                          'by sending WM_CLOSE.'),PChar(), MB_OK);另外,如果是在非字符串的位置换行,不需用 “+” 号。ShowMessage('''中国'', 你好!');  增加“引号”字符,看看这个提示。
      

  4.   

    友情up一下..楼上都说了..如果弹出的对话框中的文字也需要换行的话.这样MessageBox(0, PChar('Some programs try to close me by sending WM_CLOSE.'+#13+'我在第二行!'),PChar(Title), MB_OK); 
      

  5.   

    MessageBox(0, PChar('Some programs try to close me '+
                        'by sending WM_CLOSE.'),PChar(), MB_OK);
      

  6.   

    MessageBox(0, PChar('Some programs try to close me '+
                        'by sending WM_CLOSE.'),PChar(), MB_OK); 
      

  7.   

    MessageBox(0, PChar('Some programs try to close me by sending WM_CLOSE.'+#13#10+'我在第二行!'),PChar(Title), MB_OK);
      

  8.   

    用+号就可以实现换行了,如下:
                           MessageBox(0, PChar('Some programs try to close me '+
                        'by sending WM_CLOSE.'),PChar(), MB_OK);