www.gusucode.com > 大学排课系统,VC++实现,能实现根据教师及课程资源自动排 > 大学排课系统,VC++实现,能实现根据教师及课程资源自动排课/ARRANGE/DemoDlg.cpp
// DemoDlg.cpp : implementation file // #include "stdafx.h" #include "arrange.h" #include "DemoDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CDemoDlg dialog CDemoDlg::CDemoDlg(CWnd* pParent /*=NULL*/) : CDialog(CDemoDlg::IDD, pParent) { //{{AFX_DATA_INIT(CDemoDlg) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT } void CDemoDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDemoDlg) DDX_Control(pDX, IDC_PROGRESS1, m_progress); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CDemoDlg, CDialog) //{{AFX_MSG_MAP(CDemoDlg) ON_MESSAGE(WM_PROGRESS_OFFSET,OnProgressOffset) ON_WM_CTLCOLOR() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CDemoDlg message handlers LRESULT CDemoDlg::OnProgressOffset(WPARAM wParam,LPARAM lParam) { m_progress.OffsetPos(wParam); //让进度条前进1% return NULL; } HBRUSH CDemoDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { // TODO: Change any attributes of the DC here if(nCtlColor==CTLCOLOR_DLG) { return hBrush1; //设置对话框颜色 } // TODO: Return a different brush if the default is not desired return CDialog::OnCtlColor(pDC,pWnd,nCtlColor); } BOOL CDemoDlg::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here hBrush1=CreateSolidBrush(RGB(112,168,110)); //初始化画刷对象 return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }