Text being automatically selected: WM_SETTEXT
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.
LRESULT CALLBACK HelpAboutDlgBox(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
static char outbuf[UV_MAXANALEN];
static HWND help_abt;
/* Use messages to update, etc */
help_abt = GetDlgItem(hDlg, HELP_ABT); // Multiline edit area
strcpy(outbuf, "A lot of text");
SendMessage(help_abt, WM_SETTEXT, (WPARAM)NULL, (LPARAM)outbuf);
HELP_ABT is defined as follows:
Is there anything wrong with the above code fragment that would give rise to this?
EDITTEXT HELP_ABT, 32, 23, 293, 102, ES_MULTILINE | ES_READONLY | WS_VSCROLL