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

📄 ctxmenudlg.h

📁 Java写的文本编辑器
💻 H
字号:
/* * CtxMenuDlg.h - part of jEditLauncher package * Copyright (C) 2001 John Gellene * jgellene@nyc.rr.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or any later version. * * Notwithstanding the terms of the General Public License, the author grants * permission to compile and link object code generated by the compilation of * this program with object code and libraries that are not subject to the * GNU General Public License, provided that the executable output of such * compilation shall be distributed with source code on substantially the * same basis as the jEditLauncher package of which this program is a part. * By way of example, a distribution would satisfy this condition if it * included a working makefile for any freely available make utility that * runs on the Windows family of operating systems. This condition does not * require a licensee of this software to distribute any proprietary software * (including header files and libraries) that is licensed under terms * prohibiting redistribution to third parties. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. * * $Id: CtxMenuDlg.h,v 1.1.1.1 2001/07/03 13:14:13 jgellene Exp $ */ // CtxMenuDlg.h: interface for the CChooseCtxMenuDlg class.////////////////////////////////////////////////////////////////////////#if !defined(AFX_CTXMENUDLG_H__73264FC6_2298_4B99_8F02_9540288D4031__INCLUDED_)#define AFX_CTXMENUDLG_H__73264FC6_2298_4B99_8F02_9540288D4031__INCLUDED_#if _MSC_VER > 1000#pragma once#endif // _MSC_VER > 1000#include "resource.h"#include "InstallData.h"class CChooseCtxMenuDlg : public CDialogImpl<CChooseCtxMenuDlg>{public:	CChooseCtxMenuDlg(const InstallData* p)		: pData(p), nCtxIndex(-1), hwndList(0)	{	}	~CChooseCtxMenuDlg()	{	}	enum { IDD = IDD_CHOOSE_CTX_DIALOG };	int GetCtxVersionIndex()	{		return nCtxIndex;	}private:	const InstallData *pData;	int nCtxIndex;	HWND hwndList;BEGIN_MSG_MAP(CChooseCtxMenuDlg)	MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)	COMMAND_ID_HANDLER(IDOK, OnEndDialog)	COMMAND_ID_HANDLER(IDCANCEL, OnEndDialog)	// need handler for changed selection on list boxEND_MSG_MAP()// Handler prototypes://  LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);//  LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);//  LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);	LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)	{		CenterWindow();		int nIDIndex = 0;		int nListIndex = 0;		int nListCurrIndex = -1;		hwndList = GetDlgItem(IDC_LIST_VERSIONS);		DWORD dwVersions = pData->dwInstalledVersions |			(1 << pData->nIndexSubjectVer);		for(DWORD dwVer = dwVersions; dwVer != 0; dwVer >>= 1, ++nIDIndex)		{			if(dwVer & 0x01)			{				SendMessage(hwndList, LB_ADDSTRING, 0,					(LPARAM)(LPCTSTR)(pData->arVersionNames[nIDIndex]));                SendMessage(hwndList, LB_SETITEMDATA, nListIndex,					(LPARAM)nIDIndex);				if(nIDIndex == pData->nIndexSubjectVer)					nListCurrIndex = nListIndex;				++nListIndex;			}		}		SendMessage(hwndList, LB_SETCURSEL, (WPARAM)nListCurrIndex, 0);		return 1;	}	LRESULT OnEndDialog(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)	{		int nSelected = SendMessage(hwndList, LB_GETCURSEL, 0, 0);		if(nSelected == LB_ERR)			nCtxIndex = pData->nIndexSubjectVer;		else			nCtxIndex = (int) SendMessage(hwndList, LB_GETITEMDATA,				(WPARAM)nSelected, 0);		EndDialog(wID);		return 0;	}};#endif // !defined(AFX_CTXMENUDLG_H__73264FC6_2298_4B99_8F02_9540288D4031__INCLUDED_)

⌨️ 快捷键说明

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