[Dev-C++] Re: How to activate Edittext?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Tuukka L. <Tuu...@su...> - 2003-10-27 14:07:30
|
>> Is there any way, to activate an edit button?
You mean set focus ?
Windows focused first enabled control that have lowest id number.
You can change resource file or write litle code.
During WM_INITDIALOG:
// Set keyboard focus (dot line) to IDB_EDIT button.
SetFocus(GetDlgItem(hDlg, IDB_EDIT));
// Set BS_DEFPUSHBUTTON style to button (black border).
// Usually OK button has this style.
SendMessage(GetDlgItem(hDlg, IDB_EDIT), BM_SETSTYLE,
BS_DEFPUSHBUTTON, TRUE);
return FALSE;
|