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

📄 bookdetailsdlg.cpp

📁 Windows CE Database Programming using EDB
💻 CPP
字号:
// BookDetailsDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Books.h"
#include "BookDetailsDlg.h"


// CBookDetailsDlg dialog

IMPLEMENT_DYNAMIC(CBookDetailsDlg, CDialog)

CBookDetailsDlg::CBookDetailsDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CBookDetailsDlg::IDD, pParent)
{

}

CBookDetailsDlg::~CBookDetailsDlg()
{
}

void CBookDetailsDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CBookDetailsDlg, CDialog)
END_MESSAGE_MAP()


// CBookDetailsDlg message handlers

void CBookDetailsDlg::CreateMenu(UINT uMenuId)
{
	SHMENUBARINFO info; 
	
	info.cbSize			= sizeof(info); 
	info.hwndParent		= m_hWnd; 
	info.dwFlags		= SHCMBF_HMENU; 
	info.nToolBarId		= uMenuId; 
	info.hInstRes		= ::AfxGetInstanceHandle(); 
	info.nBmpId			= 0; 
	info.cBmpImages		= 0; 
	
	SHCreateMenuBar(&info);
}
BOOL CBookDetailsDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	CreateMenu(IDR_OKCANCEL);
	SetControlValues();

	return TRUE;
}

void CBookDetailsDlg::SetControlValues()
{
	GetDlgItem(IDC_TITLE)->SetWindowText(m_strTitle);
	GetDlgItem(IDC_ISBN)->SetWindowText(m_strISBN);
	GetDlgItem(IDC_AUTHOR)->SetWindowText(m_strAuthors);
	GetDlgItem(IDC_DESC)->SetWindowText(m_strDesc);
}
void CBookDetailsDlg::OnOK()
{
	GetDlgItem(IDC_TITLE)->GetWindowText(m_strTitle);
	GetDlgItem(IDC_ISBN)->GetWindowText(m_strISBN);
	GetDlgItem(IDC_AUTHOR)->GetWindowText(m_strAuthors);
	GetDlgItem(IDC_DESC)->GetWindowText(m_strDesc);

	CDialog::OnOK();
}

⌨️ 快捷键说明

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