Yes, that was just a small snippet cut out from the larger WM_COMMAND message catch.
Here is the more complete form:
Code:
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDC_NAMEEDIT:
switch(HIWORD(wParam))
{
case EN_SETFOCUS:
SendMessage((HWND)lParam, EM_SETSEL, (WPARAM)0, (LPARAM)-1);
break;
default:
return FALSE;
}
break;
....
I know for sure it's firing because I tested it by putting a messageBox in the notification, which pops up as expected every time I focus the edit box. As I mentioned, it makes some signs of an attempt to highlight (the caret scrolls right) but no actual text is highlighted, what is going wrong here?