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

📄 organizefavoritesdlg.h

📁 wince IE浏览器的源码
💻 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 __ORG_FAVORITES_HPP__
#define __ORG_FAVORITES_HPP__


#ifndef NO_FAVORITES

#include "defines.h"
#include "FavoritesHelper.h"
#define NUM_ICONS 3

// Organize favorites dialog 
class COrgFavoritesDlg : public CDialogImpl <COrgFavoritesDlg>
{
	public:
		COrgFavoritesDlg(CMainWnd* pMainWnd);
		~COrgFavoritesDlg();

		BEGIN_MSG_MAP(COrgFavoritesDlg)
			MESSAGE_HANDLER (WM_CREATE, OnCreate)
			MESSAGE_HANDLER (WM_INITDIALOG, OnInitDialog)
			NOTIFY_HANDLER  (IDC_FAV_TREE, TVN_DELETEITEM, OnDeleteItem)
			NOTIFY_HANDLER  (IDC_FAV_TREE, TVN_BEGINLABELEDIT, OnBeginEditLabel)
			NOTIFY_HANDLER  (IDC_FAV_TREE, TVN_ENDLABELEDIT, OnEndEditLabel)
			NOTIFY_HANDLER  (IDC_FAV_TREE, TVN_ITEMEXPANDING, OnItemExpand)
			COMMAND_HANDLER (IDC_CREATE_FOLDER, BN_CLICKED, OnCreateFolder)
			COMMAND_HANDLER (IDC_RENAME, BN_CLICKED, OnRename)
			COMMAND_HANDLER (IDC_MOVE_TO, BN_CLICKED, OnMoveTo)
			COMMAND_HANDLER (IDC_DELETE, BN_CLICKED, OnDelete)
			COMMAND_HANDLER (IDOK, BN_CLICKED, OnOk)
			COMMAND_HANDLER (IDCANCEL, BN_CLICKED, OnCancel)
		END_MSG_MAP()

		enum { IDD = IDD_FAV_ORGANIZE };

		LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
		LRESULT OnCreate (UINT uMsg, WPARAM wParam, LPARAM lParam,BOOL& bHandled);

		LRESULT OnOk (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
		LRESULT OnCancel (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);

		LRESULT OnDeleteItem(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
		LRESULT OnBeginEditLabel(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
		LRESULT OnEndEditLabel(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
		LRESULT OnItemExpand(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);

		LRESULT OnCreateFolder (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
		LRESULT OnRename (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
		LRESULT OnMoveTo (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
		LRESULT OnDelete (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
		BOOL	IsRegistryChanged();

	private:
		CWindow    m_wndTreeCtrl;
		CMainWnd*  m_wndMainWnd; 
		CFavoritesHelper m_FavHelper;
		int        m_nOpenFolder;
		int        m_nCloseFolder;
		int        m_nURL;
		HIMAGELIST m_hIml;
		BOOL	   m_fOnRename;
		BOOL	   m_fOnCreate;
		BOOL	   m_bIsDirty;
		TCHAR	   m_szSrcPath[MAX_REGKEY_LEN];
		TCHAR      m_szBtnTxt[24];

		BOOL DeleteItem (HTREEITEM hTreeItem);
		BOOL MoveKeys (LPTSTR szSourceKey, LPTSTR szDestinKey, BOOL bCreateKey=TRUE);
		BOOL MoveRegValues (HKEY hKeySrc, HKEY hKeyDest);
};

#endif // ndef NO_FAVORITES
#endif // __ORG_FAVORITES_HPP__

⌨️ 快捷键说明

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