void CPanel::CreateFile() { CMyComPtr<IFolderOperations> folderOperations; if (_folder.QueryInterface(IID_IFolderOperations, &folderOperations) != S_OK) { MessageBoxErrorForUpdate(E_NOINTERFACE, IDS_CREATE_FILE_ERROR, 0x03020243); return; } CPanel::CDisableTimerProcessing disableTimerProcessing2(*this); CSelectedState state; SaveSelectedState(state); CComboDialog comboDialog; comboDialog.Title = LangString(IDS_CREATE_FILE, 0x03020240); comboDialog.Static = LangString(IDS_CREATE_FILE_NAME, 0x03020241); comboDialog.Value = LangString(IDS_CREATE_FILE_DEFAULT_NAME, /*0x03020242*/ (UInt32)-1); if (comboDialog.Create(GetParent()) == IDCANCEL) return; UString newName = comboDialog.Value; HRESULT result = folderOperations->CreateFile(newName, 0); if (result != S_OK) { MessageBoxErrorForUpdate(result, IDS_CREATE_FILE_ERROR, 0x03020243); return; } int pos = newName.Find(WCHAR_PATH_SEPARATOR); if (pos >= 0) newName = newName.Left(pos); if (!_mySelectMode) state.SelectedNames.Clear(); state.FocusedName = newName; state.SelectFocused = true; RefreshListCtrl(state); }