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

📄 hlistbox.h

📁 这是树上的代码
💻 H
字号:
//****************************************************************************
// File:
//
//     HListBox.H
//
// Purpose:
//
//     Provides the declaration for the CHListBox class.
//
// Development Team:
//
//     James Rhodes
//
// Written by Microsoft Product Support Services, Languages Developer Support
// Copyright (c) 1996 Microsoft Corporation. All rights reserved.
//****************************************************************************

#include "stdafx.h"
#ifndef HLISTBOX_H
#define HLISTBOX_H

#include <afxtempl.h>
typedef CArray<int, int> CintArray;

/////////////////////////////////////////////////////////////////////////////
// CHListBox window

class AFX_CLASS_EXPORT CHListBox : public CListBox
{
// Construction
public:
	CHListBox();

// Attributes
protected:
	BOOL m_bLocked;             // 如果列表框不允许水平滚动则没有水平滚动条
	CintArray m_arrExtents;
	int m_nLongestExtent;
	int m_nTabStops;
	int *m_lpTabStops;

// Operations
public:
	void LockHExtentUpdate();   // 锁住水平滚动条(不让增大)
	void UnlockHExtentUpdate(); // 解锁
	void UpdateHExtent();       // 刷新水平滚动条

protected:
	void InsertNewExtent(int nItem, LPCTSTR lpszStr);
	void InsertNewExtent(int nItem, LPCTSTR lpszStr, CDC* pDC);
	void InitTabStops();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CHListBox)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CHListBox();

	// Generated message map functions
protected:
	//{{AFX_MSG(CHListBox)
	//}}AFX_MSG
	afx_msg LRESULT OnAddString(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnInsertString(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnDeleteString(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnSetTabStops(WPARAM wParam, LPARAM lParam);
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////
#endif

⌨️ 快捷键说明

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