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

📄 mainfrm.h

📁 visual c++ 实例编程
💻 H
字号:
//////////////////////////////////////////////////////////////////////////////
//类名:CMainFrame
//功能:主框架操作类
//作者:徐景周(jingzhou_xu@163.net)
//组织:未来工作室(Future Studio)
//日期:2002.8.1
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MAINFRM_H__F4EA68B4_8580_4468_9312_5B357B7C78F7__INCLUDED_)
#define AFX_MAINFRM_H__F4EA68B4_8580_4468_9312_5B357B7C78F7__INCLUDED_

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

#include "Tools/ToolBarXP.h"				  //加入XP风格工具条
#include "Tools/StatusBarXP.h"				  //加入XP风格状态条
	
class CMainFrame : public CNewFrameWnd		  //更换新的XP菜单框架
{
	
protected: // create from serialization only
	CMainFrame();
	DECLARE_DYNCREATE(CMainFrame)

// Attributes
public:

// Operations
public:

	//绘制XP风格窗体
	CRect				m_rtButtExit;			//关闭按钮位置
	CRect				m_rtButtMax;			//最大化按钮位置
	CRect				m_rtButtMin;			//最小化按钮位置
    CRect				m_rtIcon;				//程序图标位置

	void	DrawXPBmp(CDC *pDC,int ID,CPoint pt1,CPoint pt2); 
												//绘制XP风格的背景位图
	void	DrawTitleBar(CDC *pDC);				//绘制具有XP风格的窗体框架

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMainFrame)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMainFrame();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:  // control bar embedded members
	CStatusBarXP  m_wndStatusBar;
	CToolBarXP    m_wndToolBar;

// Generated message map functions
protected:
	//{{AFX_MSG(CMainFrame)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);       //非客户区左键按下消息,jingzhou xu 
	afx_msg void OnNcMouseMove(UINT nHitTest, CPoint point);         //非客户区鼠标移动消息,jingzhou xu 
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
//	DECLARE_MENUXP()                 //声明XP风格菜单映射
};

/////////////////////////////////////////////////////////////////////////////

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

#endif // !defined(AFX_MAINFRM_H__F4EA68B4_8580_4468_9312_5B357B7C78F7__INCLUDED_)

⌨️ 快捷键说明

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