From: <td...@us...> - 2003-08-07 06:48:12
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1:/tmp/cvs-serv8047 Modified Files: FindDialog.cpp Log Message: Find automatically selects the text to find when dialog initialiizes Index: FindDialog.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/FindDialog.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** FindDialog.cpp 3 Jul 2003 12:58:39 -0000 1.8 --- FindDialog.cpp 7 Aug 2003 06:48:09 -0000 1.9 *************** *** 145,150 **** comboStr = m_reg.GetProfileString(SEC_GREP,_T("LastFind"),tempStr,""); m_findcombo.SetWindowText(comboStr); ! m_findcombo.SetFocus(); ! m_check1.SetCheck(m_reg.GetProfileInt(SEC_GREP,_T("FCheck1"),0 )); m_check2.SetCheck(m_reg.GetProfileInt(SEC_GREP,_T("FCheck2"),0 )); --- 145,149 ---- comboStr = m_reg.GetProfileString(SEC_GREP,_T("LastFind"),tempStr,""); m_findcombo.SetWindowText(comboStr); ! m_check1.SetCheck(m_reg.GetProfileInt(SEC_GREP,_T("FCheck1"),0 )); m_check2.SetCheck(m_reg.GetProfileInt(SEC_GREP,_T("FCheck2"),0 )); *************** *** 157,160 **** --- 156,169 ---- m_findcombo.SetWindowText(inifind); } + + DWORD dwSel; + + // Set the selection to be all characters after the current selection. + if ((dwSel=m_findcombo.GetEditSel()) != CB_ERR) + { + m_findcombo.SetEditSel(HIWORD(dwSel), -1); + } + m_findcombo.SetFocus(); + return FALSE; // return TRUE unless you set the focus to a control |