stdafx.cpp

来自「自已写的单机修改程序(天河传说RPG)」· C++ 代码 · 共 73 行

CPP
73 行
字号
// stdafx.cpp : source file that includes just the standard includes
//	SkyRiver.pch will be the pre-compiled header
//	stdafx.obj will contain the pre-compiled type information

#include "stdafx.h"

CButtonST * SetButton(CWnd* pParent,UINT nID,DWORD Dsty,int nIconIn,int nIconOut,int nCurSor,LPCTSTR lpszText,LPCTSTR lpszURL,BOOL bRepaint)
{
	CButtonST * m_pBtn = new CButtonST;
	
	m_pBtn->SubclassDlgItem(nID,pParent);

	if(Dsty == SB_STY0)
	{
		return m_pBtn;
	}

	if(Dsty == SB_STY1)
	{
		m_pBtn->SetFlat(FALSE);

		m_pBtn->DrawBorder(TRUE);
	}

	if(Dsty == SB_STY2)
	{
		m_pBtn->SetFlat(TRUE);

		m_pBtn->DrawBorder(TRUE);
	}

	if(Dsty == SB_STY3)
	{
		m_pBtn->SetFlat(TRUE);

		m_pBtn->DrawBorder(FALSE);
	}
	
	if(nIconIn != NULL && nIconOut != NULL)
	{
		m_pBtn->SetIcon(nIconIn,nIconOut);
	}
	else if(nIconIn != NULL)
	{
		m_pBtn->SetIcon(nIconIn);
	}

	if(nCurSor != NULL)
	{
		m_pBtn->SetBtnCursor(nCurSor);
	}
	
	if(lpszText != NULL)
	{
		m_pBtn->SetTooltipText(_T(lpszText));
	}

	if(lpszURL != NULL)
	{
		m_pBtn->SetURL(lpszURL);
	}

	if(bRepaint)
	{
		pParent->Invalidate();
	}

	return m_pBtn;
}



⌨️ 快捷键说明

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