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

📄 resorgprojectsdoc.cpp

📁 ResOrg 图形化管理Vc项目的资源ID的工具的源代码。 ResOrg - Manage and Renumber Resource Symbol IDs Introduction The
💻 CPP
字号:
/************************************************************************
 *
 *                   Resource ID Organiser Add-In
 *
 * (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++ 6.0, Service Pack 3 or later
 *                                                                       
 *  Target                                                               
 *  Environment : Windows 98/NT/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/ResOrgAddIn/ResOrgProjectsDoc.cpp $
 *   $Revision: 7 $
 *       $Date: 25/11/02 16:51 $
 *     $Author: Anna $
 *
 *    $History: ResOrgProjectsDoc.cpp $
 * 
 * *****************  Version 7  *****************
 * User: Anna         Date: 25/11/02   Time: 16:51
 * Updated in $/Projects/AddIns/ResOrg/ResOrgAddIn
 * Changed website address in banner
 * 
 * *****************  Version 6  *****************
 * User: Anna         Date: 22/10/02   Time: 13:34
 * Updated in $/Projects/AddIns/ResOrg/ResOrgAddIn
 * Changed name/mail address (at last!)
 * 
 * *****************  Version 5  *****************
 * User: Andy         Date: 26/04/01   Time: 19:41
 * Updated in $/Projects/AddIns/ResOrg/ResOrgAddIn
 * Renamed Resource.h to ResOrgAddIn_Res.h
 * 
 * *****************  Version 4  *****************
 * User: Andy         Date: 29/11/00   Time: 18:37
 * Updated in $/Projects/AddIns/ResOrg/ResOrgAddIn
 * 1.  Moved Office2KDlg code to its own DLL
 * 2.  Added file banners
 *
 * $Nokeywords: $
 *
 ************************************************************************/

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

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

#include "ResOrgAddInApp.h"
#include "ResOrgAddIn_Res.h"
#include "MainFrame.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 + -