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

📄 iconlibrarydlg.cpp

📁 c++系统开发实例精粹内附的80例源代码 环境:windows2000,c++6.0
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////
// FileFury
// Copyright (c) 2000 Tenebril Incorporated
// All rights reserved.
//
// This source code is governed by the Tenebril open source
// license (http://www.tenebril.com/developers/opensource/license.html)
//
// For more information on this and other open source applications,
// visit the Tenebril OpenSource page:
//       http://www.tenebril.com/developers/opensource
//
//////////////////////////////////////////////////////////////////////

// IconLibraryDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Oscar.h"
#include "IconLibraryDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CIconLibraryDlg dialog


CIconLibraryDlg::CIconLibraryDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CIconLibraryDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CIconLibraryDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CIconLibraryDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CIconLibraryDlg)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CIconLibraryDlg, CDialog)
	//{{AFX_MSG_MAP(CIconLibraryDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CIconLibraryDlg message handlers

void CIconLibraryDlg::OnOK() 
{
	// Run the compilation.

	// Get the settings archive.
	COscarApp *pApp = (COscarApp *)AfxGetApp();
	ASSERT(pApp);
	CSettingsArchive *pArchive = pApp->GetArchive();
	ASSERT(pArchive);

	// Get the icon library.
	CSystemIconLibrary *pLibrary = &(pArchive->m_cIconLibrary);

	// Make the OK button invisible.
	CButton *pOK = (CButton *)GetDlgItem(IDOK);
	pOK->EnableWindow(FALSE);
	
	// Run the icon library update on the local filesystem.
	CFileSystem cfsLocal;
	CWaitCursor WaitCursor;
	pLibrary->Refresh(&cfsLocal, this);

	// Done.
	CDialog::OnOK();
}

BOOL CIconLibraryDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CIconLibraryDlg::UpdateStatus(LPCTSTR czStatus)
{
	CStatic *pStatus = (CStatic *)GetDlgItem(ID_STATUS);
	ASSERT(pStatus);

	pStatus->SetWindowText(czStatus);
	pStatus->SetRedraw(TRUE);
}

⌨️ 快捷键说明

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