?? propertydlg.cpp
字號:
// PropertyDlg.cpp : implementation file
//
#include "stdafx.h"
#include "multicard.h"
#include "PropertyDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPropertyDlg dialog
CPropertyDlg::CPropertyDlg(int iCardID, CWnd* pParent /*=NULL*/)
: CDialog(CPropertyDlg::IDD, pParent),
m_iCardID(iCardID)
{
//{{AFX_DATA_INIT(CPropertyDlg)
m_id = -1;
//}}AFX_DATA_INIT
}
void CPropertyDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPropertyDlg)
DDX_Radio(pDX, IDC_RADIO1, m_id);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPropertyDlg, CDialog)
//{{AFX_MSG_MAP(CPropertyDlg)
ON_BN_CLICKED(IDC_DISPLAY_PROPERTY, OnDisplayProperty)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPropertyDlg message handlers
BOOL CPropertyDlg::OnInitDialog()
{
CDialog::OnInitDialog();
char szCaption[20];
sprintf(szCaption, "%d號卡: 枚舉屬性頁", m_iCardID);
SetWindowText(szCaption);
// TODO: Add extra initialization here
m_id = -1;
BOOL bSupport;
for(int i=11; i>=0; i--)
{
DSStream_IsPropertyExist(m_iCardID, (PropertyDialog)i, &bSupport);
GetDlgItem(IDC_RADIO1+i)->EnableWindow(bSupport);
if(bSupport)
m_id = i;
}
UpdateData(FALSE);
if(m_id==-1)
GetDlgItem(IDC_DISPLAY_PROPERTY)->EnableWindow(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CPropertyDlg::OnDisplayProperty()
{
UpdateData();
if(PropertyDlg_VideoPreviewPin == (PropertyDialog)m_id)
DSStream_DisconnectPin(m_iCardID, PREVIEW);
DSStream_DisplayPropertyDialogs(m_iCardID, (PropertyDialog)m_id, m_hWnd);
if(PropertyDlg_VideoPreviewPin == (PropertyDialog)m_id)
DSStream_ConnectPin(m_iCardID, PREVIEW);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -