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

📄 windowedit.cpp

📁 骨骼动画....把魔兽模型解出的代码..
💻 CPP
字号:
//+-----------------------------------------------------------------------------
//| Included files
//+-----------------------------------------------------------------------------
#include "WindowEdit.h"


//+-----------------------------------------------------------------------------
//| Constructor
//+-----------------------------------------------------------------------------
WINDOW_EDIT::WINDOW_EDIT()
{
	//Empty
}


//+-----------------------------------------------------------------------------
//| Destructor
//+-----------------------------------------------------------------------------
WINDOW_EDIT::~WINDOW_EDIT()
{
	//Empty
}


//+-----------------------------------------------------------------------------
//| Creates an edit window
//+-----------------------------------------------------------------------------
BOOL WINDOW_EDIT::Create(CONST WINDOW_EDIT_INFO& NewEditInfo)
{
	HFONT Font;

	Destroy();

	EditInfo = NewEditInfo;

	if(EditInfo.HorizontalScroll) EditInfo.Style |= (WS_HSCROLL | ES_AUTOHSCROLL);
	if(EditInfo.VerticalScroll) EditInfo.Style |= (WS_VSCROLL | ES_AUTOVSCROLL);
	if(EditInfo.Multiline) EditInfo.Style |= (ES_MULTILINE | ES_WANTRETURN);
	if(EditInfo.ReadOnly) EditInfo.Style |= ES_READONLY;

	Window = CreateWindowEx(0, "EDIT", EditInfo.Text.c_str(), EditInfo.Style,
							EditInfo.X, EditInfo.Y, EditInfo.Width, EditInfo.Height,
							EditInfo.Parent, NULL, GetModuleHandle(NULL), NULL);
	if(Window == NULL)
	{
		Error.SetMessage("Unable to create an edit window!");
		return FALSE;
	}

	Font = CreateFont(0, 8, 0, 0, FW_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0, "Fixedsys");
	if(Font != NULL) ::SendMessage(Window, WM_SETFONT, reinterpret_cast<WPARAM>(Font), 0);

	return TRUE;
}

⌨️ 快捷键说明

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