Reputation: 99
Is it possible to set focus to the OK button in the TPrintDialog
when it opens?
Upvotes: 0
Views: 210
Reputation: 597906
In the TPrintDialog::OnShow
event, you can manually set focus to the OK button like this:
void __fastcall TMyForm::PrintDialogShow(TObject *Sender)
{
HWND btnOK = GetDlgItem(PrintDialog->Handle, IDOK);
::SetFocus(btnOK);
}
Upvotes: 2