エディットコントロールの親ウィンドウのWndProcでEN_UPDATEをキャッチし、カーソル位置を設定することで、「入力中にポインタを非表示」を回避できます。
void CreateEdit( HWND hWnd )
{
WNDCLASSEX wndClass;
memset( &wndClass, 0, sizeof( wndClass ) );
wndClass.cbSize = sizeof( wndClass );
wndClass.style = CS_SAVEBITS;
wndClass.lpfnWndProc = WndProcEditParent;
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = 0;
wndClass.hInstance = GetModuleHandle( NULL );
wndClass.hIcon = NULL;
wndClass.hCursor = NULL;
wndClass.hbrBackground = NULL;
wndClass.lpszMenuName = NULL;
wndClass.lpszClassName = L"EditParent";
RegisterClassEx( &wndClass );
HWND hWndEditParent = CreateWindowEx( 0
, L"EditParent"
, L""
, WS_CHILD | WS_BORDER
, 0
, 0
, 0
, 0
, hWnd
, NULL
, GetModuleHandle( NULL )
, 0 );
HWND hWndEdit = CreateWindowEx( 0
, L"Edit"
, L""
, WS_CHILD
, 0
, 0
, 0
, 0
, hWndEditParent
, NULL
, GetModuleHandle( NULL )
, 0 );
...
}
LRESULT CALLBACK Edit::WndProcEditParent( HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam )
{
switch( iMessage )
{
...
case WM_COMMAND:
if( HIWORD( wParam ) == EN_UPDATE )
{
// this is the hack to avoid "hide pointer while typing"
POINT point;
GetCursorPos( &point );
SetCursorPos( point.x, point.y );
}
break;
...
}
return DefWindowProc( hWnd, iMessage, wParam, lParam );
}