Replaces the selected word with the passed word
| 314 | |
| 315 | // Replaces the selected word with the passed word |
| 316 | void CScriptEditorDlg::ReplaceSelected(char *replace_word) { |
| 317 | UpdateData(false); |
| 318 | |
| 319 | CEdit *edit; |
| 320 | int start_index, end_index; |
| 321 | |
| 322 | edit = (CEdit *)GetDlgItem(IDC_SCRIPTVIEW); |
| 323 | edit->SetFocus(); |
| 324 | edit->GetSel(start_index, end_index); |
| 325 | edit->ReplaceSel(replace_word); |
| 326 | |
| 327 | UpdateData(); |
| 328 | |
| 329 | SetCurrentIndex(start_index); |
| 330 | } |
| 331 | |
| 332 | // This will start from the beginning and replace all the occurences |
| 333 | void CScriptEditorDlg::ReplaceAll(char *find_word, char *replace_word) { |
nothing calls this directly
no test coverage detected