Hi,
I am trying to set the focus in a dialog box (VariableDlg) to a specific edit box (IDC_EDIT17, double m_temp) when a selection is made from a list box (List 1), using VC++. I have used the code below;
// edit box variable
double m_temp;
void VariableDlg::OnSelchangeList1(){
....
m_temp.SetFocus();
}
but this gives the following compilation error - error C2228: left of '.SetFocus' must have class/struct/union type
So I then tried this->m_temp.SetFocus(); but it gives the same error.
I sent the message below but this only places the cursor in the edit box where ideally I would like it to highlight the text in the edit box.
SendDlgItemMessage(IDC_EDIT17, WM_SETFOCUS, NULL, NULL);
I think it would be something really simply but I don't know? Any help would be greatly appreciated.
Thankx