C++源码理解(53)

  • 格式:txt
  • 大小:26.64 KB
  • 文档页数:10
}
C++ Source Reading Comprehension Part 3
khmanagerView.cpp : implementation of the CKhmanagerView class
#include "stdafx.h"
#include "khmanager.h"
{
pDC->SetBkMode(TRANSPARENT);
此处设置字体的颜色
return (HBRUSH)m_brush_dlg.GetSafeHandle();
}
else
return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
#include "khmanagerDoc.h"
#include "khmanagerView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CKhmanagerView
{
return CView::PreCreateWindow(cs);
}
CKhmanagerView drawing
void CKhmanagerView::OnDraw(CDC pDC)
{
CKhmanagerDoc pDoc = GetDocument();
ASSERT_VALID(pDoc);
else
return;
UpdateData(FALSE);
}
BOOL CLoginDlg::OnInitDialog()
{
CDialog::OnInitDialog();
TODO: Add extra initialization here
SetDlgItemText(IDC_EDIT_INFO,"系统管理员的初始用户名为1,密码为111111");
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
{{AFX_MSG_MAP(CLoginDlg)
ON_CBN_SELCHANGE(IDC_COMBO_USERTYPE, OnSelchangeComboUsertype)
ON_WM_CTLCOLOR()
}}AFX_MSG_MAP
END_MESSAGE_MAP()
CLoginDlg message handlers
C++ Source Reading Comprehension Part 4
#if !defined(AFX_VCDATAGRID_H__2EC75D7A_B22C_4EC6_ACEC_1E388F5C29F2__INCLUDED_)
#define AFX_VCDATAGRID_H__2EC75D7A_B22C_4EC6_ACEC_1E388F5C29F2__INCLUDED_
theApp.level = 1;
else if(m_pareNoCase("教练") == 0)
= 2;
else if(m_pareNoCase("出纳员") == 0)
theApp.level = 3;
{
CDialog::DoDataExchange(pDX);
{{AFX_DATA_MAP(CLoginDlg)
DDX_Control(pDX, IDC_COMBO_USERTYPE, m_cbUserType);
DDX_Text(pDX, IDC_EDIT_USERNAME, m_strUserName);
static char THIS_FILE[] = __FILE__;
#endif
CLoginDlg dialog
extern CJXIMSApp theApp;
CLoginDlg::CLoginDlg(CWnd pParent =NULL)
: CDialog(CLoginDlg::IDD, pParent)
END_MESSAGE_MAP()
CKhmanagerView constructiondestruction
CKhmanagerView::CKhmanagerView()
{
}
CKhmanagerView::~CKhmanagerView()
{
}
BOOL CKhmanagerView::PreCreateWindow(CREATESTRUCT& cs)
{
}
void CKhmanagerView::OnEndPrinting(CDC pDC, CPrintInfo pInfo)
{
}
CKhmanagerView diagnostics
#ifdef _DEBUG
void CKhmanagerView::AssertValid() const
CVcDataGrid(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
DDX_Text(pDX, IDC_EDIT_PASSWORD, m_strUserPassword);
DDX_CBString(pDX, IDC_COMBO_USERTYPE, m_strUserType);
}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CLoginDlg, CDialog)
IMPLEMENT_DYNCREATE(CKhmanagerView, CView)
BEGIN_MESSAGE_MAP(CKhmanagerView, CView)
{{AFX_MSG_MAP(CKhmanagerView)
}}AFX_MSG_MAP
Standard printing commands
C++ Source Reading Comprehension Part 1
#include "stdafx.h"
#include "JXIMS.h"
#include "LoginDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
}
CKhmanagerView printing
BOOL CKhmanagerView::OnPreparePrinting(CPrintInfo pInfo)
{
default preparation
return DoPreparePrinting(pInfo);
}
void CKhmanagerView::OnBeginPrinting(CDC pDC, CPrintInfo pInfo)
#if _MSC_VER > 1000
#pragma once
#endif _MSC_VER > 1000
Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
NOTE: Do not modify the contents of this file. If this class is regenerated by
{
pDC->SetBkMode(TRANSPARENT);
pDC->SetTextColor(RGB(2,10,255));
此处设置字体的颜色
return (HBRUSH)m_brush_static.GetSafeHandle();
}
else if(nCtlColor == CTLCOLOR_DLG)
EXCEPTION: OCX Property Pages should return FALSE
}
HBRUSH CLoginDlg::OnCtlColor(CDC pDC, CWnd pWnd, UINT nCtlColor)
{
if(nCtlColor== CTLCOLOR_STATIC)
else
theApp.level = 0;
CDialog::OnOK();
}
void CLoginDlg::OnSelchangeComboUsertype()
{
TODO: Add your control notification handler code here
UpdateData(TRUE);
{
{{AFX_DATA_INIT(CLoginDlg)
m_strUserName = _T("");
m_strUserPassword = _T("");
m_strUserType = _T("系统管理员");
}}AFX_DATA_INIT
}
void CLoginDlg::DoDataExchange(CDataExchange pDX)

下载文档原格式

  / 10