1 #pragma once 2 #include "afxcmn.h" 3 #include "AudioCommon.h" 4 #include "afxwin.h" 5 #include "ListCtrlEx.h" 6 #include "Common.h" 7 8 9 // CFindDlg �Ի��� 10 11 class CFindDlg : public CDialog 12 { 13 DECLARE_DYNAMIC(CFindDlg) 14 15 public: 16 CFindDlg(const vector<SongInfo>& playlist, CWnd* pParent = NULL); // �����캯�� 17 virtual ~CFindDlg(); 18 19 //wstring m_config_path; 20 21 int GetSelectedTrack() const; 22 bool GetFindCurrentPlaylist() const; 23 wstring GetSelectedSongPath() const; 24 void SaveConfig(); 25 void LoadConfig(); 26 27 // �Ի������� 28 #ifdef AFX_DESIGN_TIME 29 enum { IDD = IDD_FIND_DIALOG }; 30 #endif 31 32 protected: 33 34 const vector<SongInfo>& m_playlist; //�����б� 35 vector<int> m_find_result; //���浱ǰ�����б�IJ��ҽ������Ŀ��ţ� 36 wstring m_key_word; //���ҵ��ַ��� 37 vector<wstring> m_all_find_result; //�������в����б�IJ��ҽ�����ļ�����·���� 38 39 CListCtrlEx m_find_result_list; //���ҽ���ؼ� 40 int m_item_selected{ -1 }; //���ѡ�е���Ŀ��� 41 CMenu m_menu; 42 43 //int m_dpi; 44 45 CButton m_find_file_check; 46 CButton m_find_title_check; 47 CButton m_find_artist_check; 48 CButton m_find_album_check; 49 50 bool m_find_current_playlist{ true }; //������ҷ�ΧΪ��ǰ�����б���Ϊtrue����������в����б���Ϊfalse 51 bool m_find_file{ true }; 52 bool m_find_title{ true }; 53 bool m_find_artist{ true }; 54 bool m_find_album{ true }; 55 56 int m_find_option_data{}; //�������ѡ������ݣ���ÿһ��bitλ��ʾÿ������ѡ���Ƿ�ѡ�� 57 58 int m_min_width{}; 59 int m_min_height{}; 60 61 CString m_selected_string; 62 63 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV ֧�� 64 void ShowFindResult(); 65 void ShowFindInfo(); 66 public: 67 void ClearFindResult(); 68 69 DECLARE_MESSAGE_MAP() 70 71 afx_msg void OnEnChangeFindEdit(); 72 afx_msg void OnNMClickFindList(NMHDR *pNMHDR, LRESULT *pResult); 73 afx_msg void OnBnClickedFindButton(); 74 virtual BOOL OnInitDialog(); 75 afx_msg void OnNMDblclkFindList(NMHDR *pNMHDR, LRESULT *pResult); 76 virtual BOOL PreTranslateMessage(MSG* pMsg); 77 public: 78 afx_msg void OnBnClickedFindFileCheck(); 79 afx_msg void OnBnClickedFindTitleCheck(); 80 afx_msg void OnBnClickedFindArtistCheck(); 81 afx_msg void OnBnClickedFindAlbumCheck(); 82 afx_msg void OnBnClickedFindCurrentPlaylistRadio(); 83 afx_msg void OnBnClickedFindAllPlaylistRadio(); 84 afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI); 85 afx_msg void OnSize(UINT nType, int cx, int cy); 86 afx_msg void OnFdPlay(); 87 afx_msg void OnFdOpenFileLocation(); 88 afx_msg void OnNMRClickFindList(NMHDR *pNMHDR, LRESULT *pResult); 89 afx_msg void OnFdCopyText(); 90 }; 91