Home » Source Code » Student management system » mystudentsysDlg.h

mystudentsysDlg.h ( File view )

  • By panlqcn 2013-11-24
  • View(s):15
  • Download(s):0
  • Point(s): 1
			// mystudentsysDlg.h : header file
//

#if !defined(AFX_MYSTUDENTSYSDLG_H__D7A3F2F7_898D_4B0A_B462_DF0578D65699__INCLUDED_)
#define AFX_MYSTUDENTSYSDLG_H__D7A3F2F7_898D_4B0A_B462_DF0578D65699__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CMystudentsysDlg dialog
//定义按钮状态
enum ButtonState  {
bsNormal,bsHot,bsDown
};
//按钮包装类
class CDrawButton  
{

public:
	ButtonState m_State;           //按钮当前状态
	WNDPROC     m_OldProc;         //记录按钮的窗口函数
	int         m_Flag;            //是否释放关联按钮的CDrawButton对象
	static int  m_Style;           //按钮风格
public:

	CDrawButton( )
	{

		m_State   = bsNormal;
		m_OldProc = NULL;
		m_Flag    = 0;
	
}

	virtual ~CDrawButton()
	{

		m_State   = bsNormal;
		m_OldProc = NULL;		
	
};

	LRESULT OnPaint( HWND hWnd ) 
	{

		CWnd* pWnd = CWnd::FromHandle(hWnd);
		
		CPaintDC	dc(pWnd);
		CString		Text;
		CRect		RC;
		CFont		Font;
		CFont		*pOldFont;
		CBrush		Brush;
		CBrush		*pOldBrush;
		CPoint		PT(2,2);
		
		dc.SetBkMode( TRANSPARENT );
		Font.CreateFont( 12, 0, 0, 0, FW_HEAVY, 0, 0, 0, ANSI_CHARSET, \
			OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, \
			VARIABLE_PITCH | FF_SWISS, "MS Sans Serif" );

		pOldFont = dc.SelectObject( &Font );
		
		if( m_State == bsNormal)
		{

			
			if (m_Style==2)
			{

				CBitmap bmp;
				bmp.LoadBitmap(IDB_BKBUTTON);
				Brush.CreatePatternBrush(&bmp); 
			
}
			else
				Brush.CreateSolidBrush( RGB( 200,200,200 ) );
			dc.SetTextColor( RGB( 80, 80, 80) );
		
}
		else if( m_State == bsDown )
		{

			Brush.CreateSolidBrush( RGB( 160, 160, 160 ) );
			dc.SetTextColor( RGB( 50, 50, 250 ) );
		
}
		else if( m_State == bsHot )
		{

			Brush.CreateSolidBrush( RGB( 100, 100, 180 ) );
			dc.SetTextColor( RGB( 250, 250, 0 ) );
		
}
		
		pOldBrush = dc.SelectObject( &Brush );
		pWnd->GetClientRect( &RC );
		dc.RoundRect( &RC, PT );
		
		HRGN hRgn = CreateRectRgn( RC.left, RC.top, RC.right, RC.bottom );
		pWnd->SetWindowRgn( hRgn, TRUE );
		DeleteObject( hRgn );
		
		pWnd->GetWindowText(Text );
		dc.DrawText( Text, &RC, DT_CENTER | DT_VCENTER | DT_SINGLELINE );
		
		dc.SelectObject( pOldFont );
		dc.SelectObject( pOldBrush );
		
		return TRUE;
	
}
	LRESULT OnLButtonDown( HWND hWnd, UINT nFlags, CPoint point )
	{

		m_State = bsDown;		
		SetCapture(hWnd);
		SetFocus(hWnd);
		return TRUE;
	
}
	
	LRESULT OnLButtonUp( HWND hWnd, UINT nFlags, CPoint point )
	{

		if( m_State != bsNormal )
		{

			m_State = bsNormal;
			ReleaseCapture();
			InvalidateRect(hWnd,NULL,TRUE);
			SendMessage( GetParent(hWnd), WM_COMMAND, GetDlgCtrlID(hWnd), (LPARAM) (hWnd) );
		
}
		return TRUE;
	
}

	LRESULT LoseFocus(HWND  hWnd)
	{

		m_State = bsNormal;
		InvalidateRect(hWnd,NULL,TRUE);
		SendMessage( hWnd, WM_KILLFOCUS, (long)hWnd, 0);	
		return TRUE;
	
}

	LRESULT OnMouseMove(HWND hWnd, UINT nFlags, CPoint point ) {

		HRGN hRgn = CreateRectRgn( 0, 0, 0, 0 );
		GetWindowRgn( hWnd,hRgn );
		BOOL ret = PtInRegion( hRgn, point.x, point.y );
		if( ret ) 
		{

			
			if( m_State == bsDown) 
				return TRUE;
			if( m_State != bsHot ) 
			{

				m_State = bsHot;
				InvalidateRect(hWnd,NULL,TRUE);
				UpdateWindow(hWnd);
				SetCapture(hWnd);
			
}
		
} 
		else 
		{

			m_State = bsNormal;
			Inval
...
...
(Please download the complete source code to view)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 1

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
tb_student_Data.MDF1.00 MB29-02-08|08:49
tb_student_Log.LDF1.00 MB29-02-08|08:49
Classinfodlg.cpp5.56 kB01-11-07|18:22
Classinfodlg.h1.72 kB01-11-07|17:56
Classinfoset.cpp1.31 kB28-02-06|13:54
Classinfoset.h1.29 kB28-02-06|13:54
Class_subjectinfodlg.cpp5.36 kB01-11-07|18:19
Class_subjectinfodlg.h1.79 kB01-11-07|18:19
Class_subjectset.cpp1.36 kB28-02-06|13:54
Class_subjectset.h1.32 kB28-02-06|13:54
Classinfodlg.obj29.13 kB15-11-07|13:22
Classinfodlg.sbr10.96 kB15-11-07|13:22
Classinfoset.obj14.01 kB15-11-07|13:22
Classinfoset.sbr6.93 kB15-11-07|13:22
Class_subjectinfodlg.obj26.09 kB15-11-07|13:22
Class_subjectinfodlg.sbr10.23 kB15-11-07|13:22
Class_subjectset.obj14.24 kB15-11-07|13:22
Class_subjectset.sbr7.02 kB15-11-07|13:22
Examinfo_submarkdlg.obj29.87 kB15-11-07|13:22
Examinfo_submarkdlg.sbr10.51 kB15-11-07|13:22
Examinfo_submarkset.obj15.73 kB15-11-07|13:22
Examinfo_submarkset.sbr7.26 kB15-11-07|13:22
Examkinddlg.obj31.66 kB15-11-07|13:22
Examkinddlg.sbr11.03 kB15-11-07|13:22
Examkindset.obj13.27 kB15-11-07|13:22
Examkindset.sbr6.82 kB15-11-07|13:22
excel9.obj557.85 kB15-11-07|13:22
excel9.sbr164.19 kB15-11-07|13:22
functionbtn.htm1.84 kB28-02-06|13:54
Grade_levelinfodlg.obj47.32 kB15-11-07|13:22
Grade_levelinfodlg.sbr13.93 kB15-11-07|13:22
Grade_levelset.obj13.98 kB15-11-07|13:22
Grade_levelset.sbr7.00 kB15-11-07|13:22
InfoStudent.obj28.23 kB15-11-07|13:58
InfoStudent.sbr10.50 kB15-11-07|13:58
Input_regbreakdlg.obj25.26 kB15-11-07|13:22
Input_regbreakdlg.sbr9.98 kB15-11-07|13:22
Login.obj16.89 kB17-11-07|11:00
Login.sbr7.54 kB17-11-07|11:00
LoginSet.obj13.78 kB15-11-07|13:22
LoginSet.sbr6.84 kB15-11-07|13:22
main.htm408.00 B28-02-06|13:54
menuhelp.htm2.87 kB28-02-06|13:54
msado15.tlh88.56 kB27-03-03|20:00
msado15.tli74.85 kB27-03-03|20:00
mystudentreport_sorted.xls19.50 kB28-02-06|13:54
mystudentsys.bsc4.45 MB28-02-06|13:54
mystudentsys.exe2.28 MB26-11-07|17:09
mystudentsys.ilk748.13 kB26-11-07|17:09
mystudentsys.obj35.43 kB22-11-07|10:16
mystudentsys.pch7.22 MB15-11-07|13:22
mystudentsys.pdb1.22 MB26-11-07|17:09
mystudentsys.res1.60 MB22-11-07|14:22
mystudentsys.sbr15.82 kB22-11-07|10:16
mystudentsysDlg.obj77.82 kB26-11-07|13:33
mystudentsysDlg.sbr83.18 kB26-11-07|13:33
Officeinfodlg.obj26.32 kB15-11-07|13:22
Officeinfodlg.sbr10.34 kB15-11-07|13:22
officeset.obj13.13 kB15-11-07|13:22
officeset.sbr6.76 kB15-11-07|13:22
Regbreak_finddlg.obj27.45 kB15-11-07|13:22
Regbreak_finddlg.sbr9.46 kB15-11-07|13:22
Regbrreakinfoset.obj15.98 kB15-11-07|13:22
Regbrreakinfoset.sbr7.24 kB15-11-07|13:22
Reportdlg.obj41.73 kB15-11-07|13:22
Reportdlg.sbr197.56 kB15-11-07|13:22
StdAfx.obj109.69 kB15-11-07|13:22
StdAfx.sbr1.42 MB15-11-07|13:22
Studentinfoset.obj17.18 kB15-11-07|13:22
Studentinfoset.sbr7.33 kB15-11-07|13:22
studentinfosyshelp.chm15.88 kB28-02-06|13:54
Studentinfo_finddlg.obj24.65 kB26-11-07|17:09
Studentinfo_finddlg.sbr9.34 kB26-11-07|17:09
stureporttemplate.xlt14.00 kB28-02-06|13:54
Subjectdlg.obj33.61 kB15-11-07|13:22
Subjectdlg.sbr11.18 kB15-11-07|13:22
Subjectinfo.obj14.46 kB15-11-07|13:22
Subjectinfo.sbr6.98 kB15-11-07|13:22
Teacherinfodlg.obj34.02 kB15-11-07|13:22
Teacherinfodlg.sbr11.64 kB15-11-07|13:22
Teacherinfoset.obj16.87 kB15-11-07|13:22
Teacherinfoset.sbr7.30 kB15-11-07|13:22
Userdlg.obj24.29 kB26-11-07|17:04
Userdlg.sbr9.33 kB26-11-07|17:04
vc60.idb345.00 kB26-11-07|19:44
vc60.pdb428.00 kB26-11-07|17:09
Examinfo_submarkdlg.cpp4.89 kB01-11-07|18:55
Examinfo_submarkdlg.h1.66 kB01-11-07|18:42
Examinfo_submarkset.cpp1.56 kB28-02-06|13:54
Examinfo_submarkset.h1.41 kB28-02-06|13:54
Examkinddlg.cpp5.70 kB01-11-07|18:56
Examkinddlg.h1.72 kB01-11-07|18:56
Examkindset.cpp1.22 kB28-02-06|13:54
Examkindset.h1.25 kB28-02-06|13:54
excel9.cpp143.82 kB28-02-06|13:54
excel9.h38.46 kB28-02-06|13:54
ExternDllHeader.h1.85 kB28-02-06|13:54
Grade_levelinfodlg.cpp11.07 kB02-11-07|09:27
Grade_levelinfodlg.h2.01 kB02-11-07|08:43
Grade_levelset.cpp1.42 kB28-02-06|13:54
Grade_levelset.h1.33 kB28-02-06|13:54
InfoStudent.cpp6.16 kB15-11-07|13:58
InfoStudent.h1.80 kB15-11-07|13:57
Input_regbreakdlg.cpp3.84 kB02-11-07|09:28
Input_regbreakdlg.h1.57 kB02-11-07|08:56
Login.cpp1.75 kB03-11-07|09:14
Login.h1.18 kB17-11-07|10:23
LoginSet.cpp1.25 kB03-11-07|10:13
LoginSet.h1.25 kB03-11-07|08:31
mystudentreport.xls14.50 kB26-11-07|16:46
mystudentreport_sorted.xls14.50 kB01-11-07|09:31
mystudentsys.clw17.17 kB26-11-07|19:47
mystudentsys.cpp6.28 kB22-11-07|10:16
mystudentsys.dsp8.80 kB15-11-07|13:07
mystudentsys.dsw532.00 B28-02-06|13:54
mystudentsys.h1.40 kB05-11-07|09:32
mystudentsys.opt560.50 kB26-11-07|19:47
mystudentsys.rc23.88 kB22-11-07|14:22
mystudentsysDlg.cpp8.21 kB26-11-07|13:33
mystudentsysDlg.h5.05 kB20-11-07|21:08
Officeinfodlg.cpp4.27 kB02-11-07|10:02
Officeinfodlg.h1.70 kB02-11-07|09:27
officeset.cpp1.18 kB31-10-07|08:58
officeset.h1.23 kB28-02-06|13:54
Regbreak_finddlg.cpp4.37 kB02-11-07|10:02
Regbreak_finddlg.h1.52 kB02-11-07|09:47
Regbrreakinfoset.cpp1.57 kB28-02-06|13:54
Regbrreakinfoset.h1.39 kB28-02-06|13:54
Classinfodlg.obj21.40 kB28-02-06|13:54
Classinfoset.obj8.33 kB28-02-06|13:54
Class_subjectinfodlg.obj18.71 kB28-02-06|13:54
Class_subjectset.obj8.39 kB28-02-06|13:54
Examinfo_submarkdlg.obj20.68 kB28-02-06|13:54
Examinfo_submarkset.obj9.33 kB28-02-06|13:54
Examkinddlg.obj20.18 kB28-02-06|13:54
Examkindset.obj7.92 kB28-02-06|13:54
excel9.obj263.13 kB28-02-06|13:54
functionbtn.htm1.84 kB28-02-06|13:54
Grade_levelinfodlg.obj31.79 kB28-02-06|13:54
Grade_levelset.obj8.46 kB28-02-06|13:54
Input_regbreakdlg.obj18.22 kB28-02-06|13:54
main.htm408.00 B28-02-06|13:54
menuhelp.htm2.87 kB28-02-06|13:54
mystudentreport.xls20.00 kB28-02-06|13:54
mystudentreport_sorted.xls20.00 kB28-02-06|13:54
mystudentsys.exe760.00 kB31-07-07|10:31
mystudentsys.obj11.60 kB28-02-06|13:54
mystudentsys.pch5.73 MB28-02-06|13:54
mystudentsys.pdb937.00 kB28-02-06|13:54
mystudentsys.res669.10 kB28-02-06|13:54
mystudentsysDlg.obj72.37 kB28-02-06|13:54
Officeinfodlg.obj20.85 kB28-02-06|13:54
officeset.obj7.87 kB28-02-06|13:54
Regbreak_finddlg.obj20.04 kB28-02-06|13:54
Regbrreakinfoset.obj9.43 kB28-02-06|13:54
Reportdlg.obj29.31 kB28-02-06|13:54
StdAfx.obj816.00 B28-02-06|13:54
Studentinfoset.obj10.16 kB28-02-06|13:54
studentinfosyshelp.chm15.88 kB28-02-06|13:54
studentinfosyshelp.hhp505.00 B28-02-06|13:54
Studentinfo_finddlg.obj20.82 kB28-02-06|13:54
stureporttemplate.xlt14.00 kB28-02-06|13:54
Subjectdlg.obj21.50 kB28-02-06|13:54
Subjectinfo.obj8.55 kB28-02-06|13:54
Teacherinfodlg.obj24.13 kB28-02-06|13:54
Teacherinfoset.obj9.90 kB28-02-06|13:54
vc60.idb89.00 kB28-02-06|13:54
vc60.pdb412.00 kB28-02-06|13:54
Reportdlg.cpp4.91 kB02-11-07|10:06
Reportdlg.h1.43 kB02-11-07|10:04
42.ico5.56 kB03-11-07|09:54
ace.bmp1.53 MB22-11-07|10:55
bmp00001.bmp4.26 kB31-10-07|16:02
bmp00002.bmp4.26 kB31-10-07|16:02
bmp00003.bmp4.26 kB01-11-07|08:40
bmp00004.bmp4.26 kB31-10-07|16:18
hua.bmp20.59 kB18-11-07|14:34
mystudentsys.ico5.56 kB08-10-05|16:28
mystudentsys.rc2404.00 B28-02-06|13:54
Thumbs.db44.50 kB28-02-08|10:59
toolbar.bmp61.74 kB28-02-06|13:54
toolbar1.bmp4.26 kB31-10-07|16:18
toolbar_.bmp4.26 kB31-10-07|16:18
按钮.bmp8.02 kB05-11-07|09:26
resource.h7.72 kB20-11-07|21:04
StdAfx.cpp214.00 B28-02-06|13:54
StdAfx.h1.07 kB28-02-06|13:54
Studentinfoset.cpp1.63 kB28-02-06|13:54
Studentinfoset.h1.40 kB28-02-06|13:54
studentinfosyshelp.chm15.88 kB28-02-06|13:54
studentinfosyshelp.hhp505.00 B28-02-06|13:54
Studentinfo_finddlg.cpp3.34 kB26-11-07|17:09
Studentinfo_finddlg.h1.45 kB15-11-07|13:15
stureporttemplate.xlt14.00 kB28-02-06|13:54
Subjectdlg.cpp6.36 kB02-11-07|10:59
Subjectdlg.h1.75 kB02-11-07|10:52
Subjectinfo.cpp1.32 kB01-11-07|14:13
Subjectinfo.h1.29 kB28-02-06|13:54
Teacherinfodlg.cpp6.69 kB02-11-07|11:50
Teacherinfodlg.h1.87 kB02-11-07|11:21
Teacherinfoset.cpp1.60 kB28-02-06|13:54
Teacherinfoset.h1.39 kB28-02-06|13:54
Userdlg.cpp3.80 kB26-11-07|17:04
Userdlg.h1.44 kB03-11-07|10:30
Debug0.00 B12-09-13|12:14
Release0.00 B12-09-13|12:14
res0.00 B12-09-13|12:14
database0.00 B12-09-13|12:14
源程序0.00 B12-09-13|12:14
学生管理系统0.00 B12-09-13|12:14
...
Sponsored links

mystudentsysDlg.h (7.76 MB)

Need 1 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D