fix "ok button doesn't have focus initially"
This commit is contained in:
@@ -41,6 +41,10 @@ static BOOL CALLBACK OKWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
|
|||||||
CString sMessage = g_sMessage;
|
CString sMessage = g_sMessage;
|
||||||
sMessage.Replace( "\n", "\r\n" );
|
sMessage.Replace( "\n", "\r\n" );
|
||||||
SetWindowText( GetDlgItem(hWnd, IDC_MESSAGE), sMessage );
|
SetWindowText( GetDlgItem(hWnd, IDC_MESSAGE), sMessage );
|
||||||
|
|
||||||
|
// Focus is on any of the controls in the dialog by default.
|
||||||
|
// I'm not sure why. Set focus to the button manually. -Chris
|
||||||
|
SetFocus( GetDlgItem(hWnd, IDOK) );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
|
|||||||
Reference in New Issue
Block a user