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

📄 scroll1.h

📁 是一本很经典的书
💻 H
字号:
///////////////////////////////////////////////////////////////////
//  Header  : SCROLL1.H
//
//  Purpose : Header for the SCROLL1 MFC program.
//
//  Author  : Rob McGregor, rob_mcgregor@compuserve.com
//        
//  Date    : 03-25-96
///////////////////////////////////////////////////////////////////

// Custom frame window base class
#include "..\..\chap12\mainfram\mainfram.cpp"   

// Define a scroll bar window style
#define SBS_COLOR (SBS_HORZ | WS_VISCHILD | WS_TABSTOP)

// Static control style
#define SS_STATIC (WS_VISCHILD | SS_CENTER)

// Control IDs
#define IDC_SCROLL1   100
#define IDC_SCROLL2   101
#define IDC_SCROLL3   102
#define IDC_SCROLL4   103
#define IDC_STATIC1   104

///////////////////////////////////////////////////////////////////
// CScrollBarApp - Derived application class 

class CScrollBarApp : public CWinApp
{ 
public: 
   virtual BOOL InitInstance();
};

///////////////////////////////////////////////////////////////////
// CMainWnd - Derived frame window class 

class CMainWnd : public CMainFrame
{ 
protected:
   // Three scroll bars
   CScrollBar*  m_pScroll1;
   CScrollBar*  m_pScroll2;
   CScrollBar*  m_pScroll3;
   CScrollBar*  m_pSizeBox;
   
   // One static control
   CStatic*  m_pStatic1;

   // Text height
   INT m_nTextHeight;   
   
   // Helper methods
   void UpdateClientColor();

public: 
   CMainWnd();
   ~CMainWnd();
   virtual void CreateChildControls();

   // Message handlers
   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
   afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
   afx_msg void OnSize(UINT nType, int cx, int cy);
   afx_msg void OnWinIniChange(LPCTSTR lpszSection);

   DECLARE_MESSAGE_MAP();
};

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

⌨️ 快捷键说明

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