Microsoft KB Archive/84900

{|
 * width="100%"|

PRB: Vertical Bars Displayed in Message Box, Control Text

 * }

Q84900

3.10 WINDOWS kbprg kbprb

-

The information in this article applies to:


 * Microsoft Windows Software Development Kit (SDK) 3.1

-

SYMPTOMS
When an application runs under Windows 3.0, text in a message box or in a child-window control appears on two lines, as desired. However, under Windows 3.1, the same text appears as one line with two vertical bars at the position where the line break should appear.

CAUSE
The character sequence &quot;\n\r&quot; was used to separate the two lines of text.

RESOLUTION
Modify the text to use the character sequence &quot;\r\n&quot; to break lines of text.

MORE INFORMATION
In an application developed for the Windows environment, various text strings can contain an embedded carriage return-linefeed pair to display the text on two separate lines. For example, an application can send the following message to a multiline edit control in a dialog box to display the string &quot;This is a test&quot; on two lines with a break between the words &quot;a&quot; and &quot;test&quot;:

  SetDlgItemText(hDlg, IDC_MEDIT, (LPSTR)&quot;This is a\r\ntest.&quot;)); Under Windows 3.0, both the &quot;\r\n&quot; and &quot;\n\r&quot; strings create a new line in the output text. However, under Windows 3.1, only the &quot;\r\n&quot; string creates a new line in the output. The &quot;\n\r&quot; string creates the two vertical bars previously discussed.

Additional query words: 3.00 3.10 static

Keywords : kb16bitonly kbMessageBox kbSDKPlatform

Issue type : kbprb

Technology : kbAudDeveloper kbWin3xSearch kbSDKSearch kbWinSDKSearch kbWinSDK310