Hi,
This strikes me as pretty silly, but I can't figure out why this is happening.
I've got the following code (in highly cut-down form):
For some reason, the text when displayed is being selected (as if with Control-A) and yet I'm doing nothing to achieve this. The effect is undesired.Code:LRESULT CALLBACK HelpAboutDlgBox(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { static char outbuf[UV_MAXANALEN]; static HWND help_abt; switch (message) { /* Use messages to update, etc */ case WM_INITDIALOG: help_abt = GetDlgItem(hDlg, HELP_ABT); // Multiline edit area strcpy(outbuf, "A lot of text"); SendMessage(help_abt, WM_SETTEXT, (WPARAM)NULL, (LPARAM)outbuf); return TRUE; break; case WM_COMMAND: ... break; default: break; } return FALSE; }
HELP_ABT is defined as follows:
Is there anything wrong with the above code fragment that would give rise to this?Code:EDITTEXT HELP_ABT, 32, 23, 293, 102, ES_MULTILINE | ES_READONLY | WS_VSCROLL
TIA!



LinkBack URL
About LinkBacks


