📄 favfolders.h
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
#ifndef __FAV_FOLDERS_HPP__
#define __FAV_FOLDERS_HPP__
#ifndef NO_FAVORITES
#include "defines.h"
#include "FavStorageIfc.h"
#include "FavoritesHelper.h"
#define TOT_ICONS 2
// Organize favorites dialog
class CFavFoldersDlg : public CDialogImpl <CFavFoldersDlg>
{
public:
CFavFoldersDlg(CWindow* pMainWnd,int nTitle, int nMessage,BOOL bNewFolder=TRUE);
~CFavFoldersDlg();
BEGIN_MSG_MAP(COrgFavoritesDlg)
MESSAGE_HANDLER (WM_CREATE, OnCreate)
MESSAGE_HANDLER (WM_INITDIALOG, OnInitDialog)
NOTIFY_HANDLER (IDC_FAVORITES, TVN_BEGINLABELEDIT, OnBeginEditLabel)
NOTIFY_HANDLER (IDC_FAVORITES, TVN_ENDLABELEDIT, OnEndEditLabel)
COMMAND_HANDLER (IDC_CREATE_FOLDER, BN_CLICKED, OnCreateFolder)
COMMAND_HANDLER (IDOK, BN_CLICKED, OnOk)
COMMAND_HANDLER (IDCANCEL, BN_CLICKED, OnCancel)
END_MSG_MAP()
enum { IDD = IDD_FAVORITE_FOLDERS };
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnCreate (UINT uMsg, WPARAM wParam, LPARAM lParam,BOOL& bHandled);
LRESULT OnBeginEditLabel(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
LRESULT OnEndEditLabel(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
LRESULT OnCreateFolder (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
LRESULT OnOk (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
LRESULT OnCancel (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
TCHAR* GetDestinationFolder();
private:
CWindow m_wndTreeCtrl;
CWindow* m_wndMainWnd;
int m_nOpenFolder;
int m_nCloseFolder;
int m_nTitle;
int m_nMessage;
HIMAGELIST m_hIml;
HTREEITEM m_hNewItem;
HTREEITEM m_hRootItem;
BOOL m_fSrcSelected;
BOOL m_bNewFolderSupport;
TCHAR m_szSrcPath[MAX_REGKEY_LEN];
IFavStorage* m_pIFavStorage;
CFavoritesHelper m_FavHelper;
};
#endif // ndef NO_FAVORITES
#endif // __FAV_FOLDERS_HPP__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -