• Popular Now

• 11
• 9
• 10
• 9
• 11

Archived

This topic is now archived and is closed to further replies.

[Windows] Dialog boxes

This topic is 6150 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hi, how do I put a text in an edit field inside a dialog box without a selection? If I try SetDlgItemText, the text is always highlighted. And do I have to use "13, 10" for a new line (I''d like to use the normal "\n")? Thanks in advance Darkening

Share on other sites
  case WM_CREATE: hDlg = CreateDialog(hInst,MAKEINTRESOURCE(IDD_MYDIALOG),hWnd,(DLGPROC)DlgWndProc); ShowWindow(hDlg,SW_SHOW); SetDlgItemText(hDlg,IDC_EDIT,"Hello World\r\nJust testing");[\SOURCE]Yes, because of Windows, you have to use \r\n to make a newline.Edited by - Nytegard on June 21, 2001 8:56:01 PM