xsbrowsefolder.h

来自「一个将asp脚本转换为php脚本的工具。在实际开发中很有用。」· C头文件 代码 · 共 50 行

H
50
字号
/**************************************************************************************/
/* CXSBrowseFolder                                                                    */
/**************************************************************************************/
/* This is a simple class to wrap the SHBrowseForFolder function.                     */
/**************************************************************************************/
/* Written by Dana Holt, Xenos Software                                             */
/* http://www.xenossoftware.com                                                       */
/* This class is provided as-is, and carries no warranty or guarantee of any kind.    */
/* Use at your own risk.                                                              */
/**************************************************************************************/

#pragma once

class CXSBrowseFolder
{
public:

	enum retCode {

		RET_CANCEL = 0,
		RET_NOPATH,
		RET_OK

	};

public:
	CXSBrowseFolder(void);
	~CXSBrowseFolder(void);
protected:
	// Holds the current style
	DWORD m_style;
public:
	// Modifies the current style
	DWORD ModifyStyle(DWORD add, DWORD remove = 0);
	// Returns the current style
	DWORD GetStyle(void);
	// Displays the dialog
	CXSBrowseFolder::retCode Show(HWND parent, LPSTR pathBuffer);
	// Set the title of the dialog
	void SetTitle(LPSTR title);
protected:
	// Buffer to receieve the display name of the selected object
	char m_displayName[MAX_PATH];
	// Root item to start browsing at
	LPITEMIDLIST m_root;
	// Text to display above the tree view control
	char m_title[MAX_PATH];
		
};

⌨️ 快捷键说明

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