⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filedialogext.cpp

📁 Password Safe Password Safe is a password database utility. Users can keep their passwords securely
💻 CPP
字号:
/// \file FileDialogExt.cpp//-----------------------------------------------------------------------------#include "stdafx.h"#include "PasswordSafe.h"#include "FileDialogExt.h"#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE[] = __FILE__;#endif//-----------------------------------------------------------------------------IMPLEMENT_DYNAMIC(CFileDialogExt, CFileDialog)CFileDialogExt::CFileDialogExt(BOOL bOpenFileDialog,                               LPCTSTR lpszDefExt,                               LPCTSTR lpszFileName,                               DWORD dwFlags,                               LPCTSTR lpszFilter,                               CWnd* pParentWnd)   : CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName,                 dwFlags, lpszFilter, pParentWnd){   m_ext = lpszDefExt;}BEGIN_MESSAGE_MAP(CFileDialogExt, CFileDialog)END_MESSAGE_MAP()BOOLCFileDialogExt::OnFileNameOK(){   if (m_ext != NULL)   {      if (GetFileExt() != m_ext          && GetFileExt() != "")      {         CString temp = m_ext;         temp = "This file type must have a ."            + temp            + " extension.";         MessageBox(temp, "File name error", MB_OK|MB_ICONWARNING);         return 1;      }   }   return CFileDialog::OnFileNameOK();}//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -