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

📄 afxwinex.h

📁 一个完整的桌面日历程序
💻 H
字号:
// ------------------------------------------------------------------------------------------------------------------------------------------------------
// -																																					-
// - File:			afxwinex.h.																															-
// -																																					-
// - Contents: 		-																																	-
// -																																					-
// - Purpose:  		Extra app. functionality.																											-
// -																																					-
// - Remarks:    	-																																	-
// -																																					-
// - Originator: 	Michael Mogensen, CMG DK.																											-
// -																																					-
// - Compiler:		MS Visual C++ ver6.0.																											    -
// -																																					-
// - Period:		00.00.00 - 00.00.00.																											    -
// -																																					-
// - Version:		1.00. 																																-
// -																																					-
// ------------------------------------------------------------------------------------------------------------------------------------------------------

// ------------------------------------------------------------------------------------------------------------------------------------------------------
// - Miscellaneous.																																		-
// ------------------------------------------------------------------------------------------------------------------------------------------------------
#ifndef AFXWINEX_H
#define AFXWINEX_H

// ------------------------------------------------------------------------------------------------------------------------------------------------------
// - Header(s).																																			-
// ------------------------------------------------------------------------------------------------------------------------------------------------------
#include <afxwin.h>

#ifndef FILEINFO_HPP
	#include "fileinfo.hpp"
#endif

// ------------------------------------------------------------------------------------------------------------------------------------------------------
// - Miscellaneous.																																		-
// ------------------------------------------------------------------------------------------------------------------------------------------------------

// ------------------------------------------------------------------------------------------------------------------------------------------------------
// - CWinAppEx.																																			-
// ------------------------------------------------------------------------------------------------------------------------------------------------------
class CWinAppEx : public CWinApp
{
	public:
		// 1. Object. (alphabetical).
		CWinAppEx() :
			CWinApp()
			{}
		~CWinAppEx() 
		{}
		// 4. Slaves. (alphabetical).
		inline const CString GetExeName(const bool bFullPathPrefix = false)
		// Return full name of this program (like "c:\my_lib\my_app.exe").
		{
			CString cstrPath(_T(""));
			cstrPath.Format(TEXT("%s.exe"), m_pszExeName);
			if(bFullPathPrefix)
			{
				CString cstrPathEx(_T(""));
				cstrPathEx.Format(TEXT("%s\\%s"), (LPCTSTR)get_cur_dir(), (LPCTSTR)cstrPath);
				cstrPath = cstrPathEx;
			}
			cstrPath.MakeLower();
			return cstrPath;
		}
		CONST BOOL LoadCursor(LPCTSTR lpszCursor)
		// Load this cursor.
		{
			CWinAppEx *pApp = static_cast<CWinAppEx*>(AfxGetApp());
			if(pApp)
			{
				::SetCursor((HCURSOR)pApp->LoadStandardCursor(MAKEINTRESOURCE(lpszCursor)));
				return TRUE;
			}
			return FALSE;
		}
		inline CONST BOOL SetStandardCursor(LPCTSTR lpszCursor)
		// Load this standard cursor. Return T on succes and F if not.
		{ return(::SetCursor((HCURSOR)LoadStandardCursor(MAKEINTRESOURCE(lpszCursor))) != NULL); }
};

// ------------------------------------------------------------------------------------------------------------------------------------------------------
// -																																				  	-
// ------------------------------------------------------------------------------------------------------------------------------------------------------

// 0. Data. (alphabetical).
// 1. Object. (alphabetical).
// 2. Event's. (alphabetical).
// 3.0. Menu choice. (menu order).
// 3.1. Menu choice, enablers. (menu order).
// 4. Slaves. (alphabetical).
// 5. Other. (alphabetical).

#endif

⌨️ 快捷键说明

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