- visualframework_src.zip
- sample
- CNN
- cls.cls
- MSSCCPRJ.SCC
- PrjCnn.dll
- PrjCnn.exp
- PrjCnn.lib
- PrjCnn.vbp
- PrjCnn.vbw
- DemoDoc
- MfcViewLib
- ObjManager
- VbComLib
- VBDoc
- MSSCCPRJ.SCC
- prjVBDoc.vbp
- prjVBDoc.vbw
- UD.dob
- VCSharpComLib
- VisualFrameWork
|
// DocumentPropertyDlg.cpp : implementation file
//
#include "stdafx.h"
#include "VisualFrameWork.h"
#include "DocumentPropertyDlg.h"
#include "VisualFrameWorkDoc.h"
#include "DocumentCtrl.h"
// CDocumentPropertyDlg dialog
IMPLEMENT_DYNAMIC(CDocumentPropertyDlg, CDialog)
CDocumentPropertyDlg::CDocumentPropertyDlg(CWnd* pParent /*=NULL*/)
: CDialog(CDocumentPropertyDlg::IDD, pParent)
, m_strCaption(_T(""))
, m_strObjID(_T(""))
{
m_pDoc = NULL;
}
CDocumentPropertyDlg::~CDocumentPropertyDlg()
{
}
void CDocumentPropertyDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text(pDX, IDC_CAPTION, m_strCaption);
DDX_Text(pDX, IDC_DOCCOMCTRL, m_strObjID);
}
BEGIN_MESSAGE_MAP(CDocumentPropertyDlg, CDialog)
ON_BN_CLICKED(IDC_BUTTON_DOCPROPERTY, OnBnClickedButtonDocproperty)
ON_BN_CLICKED(IDOK, OnBnClickedOk)
END_MESSAGE_MAP()
// CDocumentPropertyDlg message handlers
void CDocumentPropertyDlg::OnBnClickedButtonDocproperty()
{
// TODO: Add your control notification handler code here
if(m_pDoc)
m_pDoc->m_pDocument->DocProperty();
}
void CDocumentPropertyDlg::OnBnClickedOk()
{
// TODO: Add your control notification handler code here
UpdateData(true);
if(m_pDoc)
{
//m_pDoc->m_strTitle = m_strCaption;
m_pDoc->m_pDocument->m_bstrCaption = m_strCaption.AllocSysString();
if(m_pDoc->m_bMainDoc)
theApp.m_pMainWnd->SetWindowText(m_strCaption);
m_pDoc->SetTitle(m_strCaption);
m_pDoc->strComObjID = m_strObjID;
}
OnOK();
}
BOOL CDocumentPropertyDlg::OnInitDialog()
{
USES_CONVERSION;
CDialog::OnInitDialog();
// TODO: Add extra initialization here
if(m_pDoc)
{
m_strCaption = OLE2T(m_pDoc->m_pDocument->m_bstrCaption);
m_strObjID = m_pDoc->strComObjID;
UpdateData(false);
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.