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

📄 wndutil.h

📁 蚁群算法的C++实现,让读者更清晰的了解蚁群算法的完整思路
💻 H
字号:
/****************************************************************************
 *	class		:	CWndUtil
 *	author		:	Peter Mares / kinkycode.com (gui@kinkycode.com)
 *	base class	:	none
 *	notes		:	Helper class for custom CWnd registration (Should derived from here)
 *
 *	Blurb		:	Its free, it feels good and its from South Africa :)
 ****************************************************************************
 *	Version History:
 *
 *	v0.1 (2003-05-10)
 *
 *	- First public release
 *
 ****************************************************************************/

#if !defined(AFX_WNDUTIL_H__979E2102_DC7C_461D_AA76_40F06C0FBF87__INCLUDED_)
#define AFX_WNDUTIL_H__979E2102_DC7C_461D_AA76_40F06C0FBF87__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CWndUtil  
{
protected:
	CWndUtil(LPCTSTR lpszClassName)
		: m_strClassName(lpszClassName)
	{
	}

	virtual ~CWndUtil()
	{
	}

public:

	virtual BOOL			RegisterWndClass()
	{
		WNDCLASS			wnd;
		HINSTANCE			hInst = AfxGetInstanceHandle();

		if ( !(::GetClassInfo( hInst, m_strClassName, &wnd )) )
		{
			wnd.style				= CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;
			wnd.lpfnWndProc			= ::DefWindowProc;
			wnd.cbClsExtra			= wnd.cbWndExtra = 0;
			wnd.hInstance			= hInst;
			wnd.hIcon				= NULL;
			wnd.hCursor				= AfxGetApp()->LoadStandardCursor(IDC_ARROW);
			wnd.hbrBackground		= NULL;
			wnd.lpszMenuName		= NULL;
			wnd.lpszClassName		= m_strClassName;

			if ( !AfxRegisterClass(&wnd) )
			{
				AfxThrowResourceException();
				return FALSE;
			}
		}

		return TRUE;
	}

protected:
	// class registration/information
	CString					m_strClassName;
};

#endif // !defined(AFX_WNDUTIL_H__979E2102_DC7C_461D_AA76_40F06C0FBF87__INCLUDED_)

⌨️ 快捷键说明

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