wannabegood
Programmer
I am a beginner in win32 api programming. Could you please someone help me?
I am trying to use \n or \t, print control char, in a dialog Control edit defined as follows.
EDITDLG DIALOG 0,0,400,300
STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | 0x200L | WS_POPUP | \
WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "PS Batch Monitor Dialog"
FONT 8, "Arial"
BEGIN
CONTROL "", IDC_EDITDLG_TEXT, "edit", \
ES_LEFT | ES_MULTILINE | ES_READONLY | ES_WANTRETURN, \
8, 20, 384, 255
....
If I use the 'SetDlgItemText(hwnd, IDC_EDITDLG_TEXT, "hello \n\n THis is testing"
;'
it prints like this, showing '\n' as unreadable square box?
hello'unreadable square box''unreaderable square box' THis is testing
Do I use other command, not SetDlgItemText or do I have to massage it before using the command? Actually, I am using 'SetDlgItemText(hwnd, IDC_EDITDLG_TEXT, testmsg);' where testmsg comes from Unix using winsock TCP/IP and contains \n or \t character to feed lines.
Thank you very much.
I am trying to use \n or \t, print control char, in a dialog Control edit defined as follows.
EDITDLG DIALOG 0,0,400,300
STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | 0x200L | WS_POPUP | \
WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "PS Batch Monitor Dialog"
FONT 8, "Arial"
BEGIN
CONTROL "", IDC_EDITDLG_TEXT, "edit", \
ES_LEFT | ES_MULTILINE | ES_READONLY | ES_WANTRETURN, \
8, 20, 384, 255
....
If I use the 'SetDlgItemText(hwnd, IDC_EDITDLG_TEXT, "hello \n\n THis is testing"
it prints like this, showing '\n' as unreadable square box?
hello'unreadable square box''unreaderable square box' THis is testing
Do I use other command, not SetDlgItemText or do I have to massage it before using the command? Actually, I am using 'SetDlgItemText(hwnd, IDC_EDITDLG_TEXT, testmsg);' where testmsg comes from Unix using winsock TCP/IP and contains \n or \t character to feed lines.
Thank you very much.