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

📄 listdatasets.h

📁 图像处理的压缩算法
💻 H
字号:
/*------------------------------------------------------------------------------*
 * File Name: ListDataSets.h				 									*
 * Creation: GJL 11/17/03 														*
 * Purpose: OriginC header file containing ListDataSets example dialog.			*
 * Copyright (c) OriginLab Corp.	2003, 2004, 2005, 2006, 2007		 		*
 * All Rights Reserved															*
 * 																				*
 * Modification Log:															*
 *------------------------------------------------------------------------------*/

// ListDataSets Dialog derived class
class ListDataSets : public Dialog
{
public:

	// Constructor
	ListDataSets() : Dialog(IDD_LDS_DLG, "ListDataSets") { }

	// Launch dialog
	int DoModal(HWND hParent = NULL)
	{
		InitMsgMap();// will be called from internal later
		int nRet = Dialog::DoModal(hParent);
		return nRet;
	}

protected:

	// Message Map
	EVENTS_BEGIN
		ON_INIT(OnInitDialog)
		ON_OK(OnOK)
	EVENTS_END
	
	// Initialize dialog and list box
	BOOL OnInitDialog()
	{
		string strDataName;
		m_lbxAvailableData = GetItem(IDC_LDS_LIST1);

		// Loop through all data set names in project
		foreach(strDataName in Project.DatasetNames)
		{
			m_lbxAvailableData.AddString(strDataName); // Add name to list box
		}
		
		return TRUE;
	}

	// Output selected item in list box
	BOOL OnOK()
	{
		int index;
		string strDataName, strOut;
		
		index = m_lbxAvailableData.GetCurSel(); // Get selected item's index
		m_lbxAvailableData.GetText(index, strDataName); // Get selected item's text

		if( !strDataName.IsEmpty() )
		{
			strOut.Format("You selected the data set %s.\n", strDataName);
			strOut.Write(WRITE_MESSAGE_BOX);
		}

		return TRUE;
	}
	
private:
	ListBox m_lbxAvailableData; // ListBox control
};

⌨️ 快捷键说明

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