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

📄 drawformdlg.h

📁 VC经典换肤程序,很好使用
💻 H
字号:
// DrawFormDlg.h : header file
//

#if !defined(AFX_DRAWFORMDLG_H__DBC14FE9_4844_4FDE_8774_56D2DBF9376B__INCLUDED_)
#define AFX_DRAWFORMDLG_H__DBC14FE9_4844_4FDE_8774_56D2DBF9376B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "MyStatic.h"

/////////////////////////////////////////////////////////////////////////////
// CDrawFormDlg dialog



//按钮状态
enum CButtonState{bsNone,bsIni,bsMin,bsMax,bsRes,bsClose};

#define fLeftBand     1
#define fLeftTitle    2
#define fRightTitle   4
#define fMidTitle     8
#define fRightBand    16
#define fBottomBand   32
#define fLeftBottom   64
#define fRightBottom  128
#define fMinButton    256
#define fMaxButton    512
#define fCloseButton  1024
#define fAll          2047


class CDrawFormDlg : public CDialog
{
// Construction
public:
	void OnCancel();
	void SetWinVisibleRect();
	void InitSkin();
	void DrawFormCaption();
/**************************绘制窗口***********************
函数名称: DrawForm
功能描述: 绘制窗口的各个区域
参数说明: Flags表示绘制窗口的哪个部分,说明如下:
          fLeftBand:    左边框
		  fLeftTitle:   左标题
		  fRightTitle:  右标题
		  fMidTitle:    中间标题
		  fRightBand:   右边框
		  fBottomBand:  底边框
		  fLeftBottom:  左下角
		  fRightBottom: 右下角
		  fMinButton:   最小化按钮
		  fMaxButton:   最大化按钮
		  fCloseButton: 关闭按钮			
**********************************************************/

	void DrawForm(UINT Flags =fAll);
	CSkin*    pSkin;
	HINSTANCE hInstance;
	CBitmap   m_Bk;
	BOOL      m_LoadDll;  //是否加载Dll

	int       m_TitleDrawHeight;    //标题栏实际的绘制高度
	BOOL      m_IsMax;            //是否处于最大化状态
	int       m_BorderWidth;       //边框宽度
	int       m_BorderHeight;      //边框高度
	int       m_FrameWidth ;  //窗体3D宽度
	int       m_FrameHeight; //窗体3D高度
	int       m_CaptionHeight;     //标题栏的高度
	CString   m_Caption;       //窗口标题
	COLORREF  m_CapitonColor; //标题字体颜色
	CFont     m_CaptionFont;     //标题字体
	int       m_ButtonWidth;       //按钮位图宽度
	int       m_ButtonHeight;      //按钮位图高度

	
	BOOL      m_FirstShow;        //窗口首次被显示
	CRect     m_OrigonRect;      //原始窗口区域
	CRect m_IniRect,m_MinRect,m_MaxRect,m_CloseRect; //标题栏按钮的显示区域
	CRect m_LTitleRc, m_MTitleRc,m_RTitleRc;         //左标题,中间标题,右标题显示区域
	
	CButtonState m_ButtonState; //按钮状态

	BOOL m_IsDrawForm;          //是否需要绘制窗体

	UINT DLGID;


	CRgn WndRgn,ClipRgn;//////////////////////////////////////

    CDrawFormDlg(CWnd* pParent = NULL,UINT ID = 0);	// standard constructor
//	CDrawFormDlg(CWnd* pParent = NULL);	/////////////////// standard constructor要改

// Dialog Data
	//{{AFX_DATA(CDrawFormDlg)
	enum { IDD = IDD_DRAWFORM_DIALOG };
	CMyStatic	m_label2;
	CMyStatic	m_label1;
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDrawFormDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CDrawFormDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButton1();
	afx_msg void OnButton2();
	afx_msg void OnRestorebutton();
	/////////////////////////////////////////////
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg BOOL OnNcActivate(BOOL bActive);
	afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
	afx_msg void OnNcMouseMove(UINT nHitTest, CPoint point);
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnNcPaint();
	afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point);
	afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DRAWFORMDLG_H__FC4FFAD9_C4E2_4A3F_AB4C_D0676C8C083A__INCLUDED_)

⌨️ 快捷键说明

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