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

📄 sheet.cpp

📁 用回溯法求解0—1背包问题
💻 CPP
字号:
// Sheet.cpp : implementation file
//

#include "stdafx.h"
#include "hmssuanfa.h"
#include "Sheet.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CSheet

IMPLEMENT_DYNAMIC(CSheet, CPropertySheet)

CSheet::CSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
	:CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
	AddPage(&m_Page1);
 	AddPage(&m_Page2);
// 	AddPage(&m_Page3);
}

CSheet::CSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
	:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
	AddPage(&m_Page1);
 	AddPage(&m_Page2);
// 	AddPage(&m_Page3);
}

CSheet::~CSheet()
{
}


BEGIN_MESSAGE_MAP(CSheet, CPropertySheet)
	//{{AFX_MSG_MAP(CSheet)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSheet message handlers

BOOL CSheet::OnInitDialog() 
{
	BOOL bResult = CPropertySheet::OnInitDialog();
	
	// TODO: Add your specialized code here
	int   ids[]   =   {   ID_APPLY_NOW,/*IDOK,*/IDCANCEL};   
	for(int i  = 0; i <sizeof(ids)/sizeof(ids[0]); i++)   
	{   
		CWnd   *   pWnd   =   GetDlgItem(ids[i]);   
		ASSERT(pWnd);   
		if(pWnd)   pWnd->ShowWindow(FALSE);   
	}   
	GetDlgItem(IDOK)->SetWindowText("退出");
	::SetWindowLong(   m_hWnd,   GWL_STYLE,   GetStyle()   |   WS_MINIMIZEBOX   );   
    
	//   add   the   minimize   command   to   the   system   menu   
// 	GetSystemMenu(   FALSE   )->InsertMenu(   -1,   MF_BYPOSITION   |   MF_STRING,   
//         SC_ICON,   "Minimize"   ); 
  SetIcon(   AfxGetApp()->LoadIcon(   IDI_ICON1   ),   FALSE   );   
  SetIcon(   AfxGetApp()->LoadIcon(   IDI_ICON1   ),   TRUE   );  
	return bResult;
}

⌨️ 快捷键说明

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