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

📄 resorgprojectsdoc.cpp

📁 ResOrg 图形化管理Vc项目的资源ID的工具的源代码。 ResOrg - Manage and Renumber Resource Symbol IDs Introduction The
💻 CPP
字号:
/************************************************************************
 *
 *               Resource ID Organiser Add-In for Visual C++.NET
 *
 * (c) Copyright 2000-2002 by Anna-Jayne Metcalfe (resorg@annasplace.me.uk)
 *                         All rights reserved.
 *
 ************************************************************************
 *                                                                       
 *  Filename    : ResOrgProjectsDoc.cpp
 *
 *  Description : CResOrgProjectsDoc - project workspace document class
 *
 *  Compiler    : Microsoft Visual C++ 7.0
 *                                                                       
 *  Target                                                               
 *  Environment : Windows 2000/XP
 *
 *  NOTE:
 *
 *    This software is provided "as is" free for personal use. All
 *    title and copyrights in and to the software, including but not
 *    limited to any images, text, etc. incorporated into it, are
 *    owned by Anna-Jayne Metcalfe, except where acknowledged otherwise.
 *
 *    Your may freely to use this code in your own products, PROVIDED
 *    this notice is not removed or modified.
 *
 *
 *    Visit http://www.annasplace.me.uk/resorg for latest updates
 *
 ************************************************************************
 *
 *   MODIFICATION HISTORY:
 *
 *           This is a controlled document. See project configuration
 *           control tool for latest version and full version history.
 *
 *    $Archive: /Projects/AddIns/ResOrg/ResOrgNETAddIn/ResOrgProjectsDoc.cpp $
 *   $Revision: 4 $
 *       $Date: 25/11/02 15:27 $
 *     $Author: Anna $
 *
 *    $History: ResOrgProjectsDoc.cpp $
 * 
 * *****************  Version 4  *****************
 * User: Anna         Date: 25/11/02   Time: 15:27
 * Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddIn
 * Changed website address in banner
 * 
 * *****************  Version 3  *****************
 * User: Anna         Date: 22/10/02   Time: 14:15
 * Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddIn
 * Changed name/email address (at last!)
 * 
 * *****************  Version 2  *****************
 * User: Andy         Date: 1/08/02    Time: 16:42
 * Updated in $/Projects/AddIns/ResOrg/ResOrgNETAddIn
 * Renamed the module to ResOrgNETAddIn
 * 
 * *****************  Version 1  *****************
 * User: Andy         Date: 10/06/02   Time: 17:16
 * Created in $/Projects/AddIns/ResOrg/ResOrgAddInVc7
 * 
 * $Nokeywords: $
 *
 ************************************************************************/

// ResOrgProjectsDoc.cpp : implementation of the CResOrgProjectsDoc class
//

#include "StdAfx.h"
#include <comdef.h>
#include "ResOrgNETAddIn_Res.h"

#include "ResOrgProjectsDoc.h"


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




/////////////////////////////////////////////////////////////////////////////
// CResOrgProjectsDoc

IMPLEMENT_DYNCREATE(CResOrgProjectsDoc, CResOrgProjectsDoc_BASE)

BEGIN_MESSAGE_MAP(CResOrgProjectsDoc, CResOrgProjectsDoc_BASE)
	//{{AFX_MSG_MAP(CResOrgProjectsDoc)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CResOrgProjectsDoc construction/destruction

CResOrgProjectsDoc::CResOrgProjectsDoc(void)
{
}


CResOrgProjectsDoc::~CResOrgProjectsDoc(void)
{
}


/////////////////////////////////////////////////////////////////////////////
// CResOrgProjectsDoc overrides

BOOL CResOrgProjectsDoc::OnNewDocument(void)
{
	BOOL bResult = CResOrgProjectsDoc_BASE::OnNewDocument();

	return bResult;
}


void CResOrgProjectsDoc::DeleteContents(void) 
{
	CResOrgProjectsDoc_BASE::DeleteContents();
}


/////////////////////////////////////////////////////////////////////////////
// CResOrgProjectsDoc serialization

void CResOrgProjectsDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
	}
}


/////////////////////////////////////////////////////////////////////////////
// CResOrgProjectsDoc diagnostics

#ifdef _DEBUG
void CResOrgProjectsDoc::AssertValid(void) const
{
	CResOrgProjectsDoc_BASE::AssertValid();
}


void CResOrgProjectsDoc::Dump(CDumpContext& dc) const
{
	CResOrgProjectsDoc_BASE::Dump(dc);
}
#endif //_DEBUG


/////////////////////////////////////////////////////////////////////////////
// CResOrgProjectsDoc operations

CDocument* CResOrgProjectsDoc::GetOpenDocument(const CString& sPathName) const
{
	CNGDocEnumerator docs;

	CDocument* pDoc = NULL;
	do
	{
		pDoc = docs.GetNextDoc();
		if (NULL != pDoc)
		{
			if (pDoc->GetPathName().CompareNoCase(sPathName) == 0 )
			{
				return pDoc;
			}
		}
	} while (NULL != pDoc);

	return NULL;
}


BOOL CResOrgProjectsDoc::SetActiveDocument(CDocument* pDoc)
{
	BOOL bResult = FALSE;

	if (NULL != pDoc)
	{
		POSITION pos = pDoc->GetFirstViewPosition();
		if (NULL != pos)
		{
			CView* pView = pDoc->GetNextView(pos);
			if (NULL != pView)
			{
				CMDIChildWnd* pFrame = (CMDIChildWnd*)pView->GetParentFrame();
				ASSERT_KINDOF(CMDIChildWnd, pFrame);
				pFrame->MDIActivate();

				bResult = TRUE;
			}
		}
	}
	return bResult;
}


/////////////////////////////////////////////////////////////////////////////
// CResOrgProjectsDoc commands

⌨️ 快捷键说明

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