hscrolllistbox.usage.txt

来自「A ping test tool. Use to check ping spee」· 文本 代码 · 共 22 行

TXT
22
字号
Usage
Okay, how one can utilize CHScrollListBox class? Here are some steps to take, sort of manual labor, that will get you there:

In the resource editor, create a dialog template that will host a listbox control. 
Set properties of the list box according to the picture above (at least, Horizontal Scroll, Selection, and Owner Draw should match). 
In the header file of your dialog's class, associated with the template, add: 

#include "HScrollListBox.h"

Define a member variable of CHScrollListBox, like so: 

CHScrollListBox m_listBox;

In the implementation file, in DoDataExchange() function, add a line: 

DDX_Control(pDX, IDC_YOUR_LISTBOX_CTRL_ID, m_listBox);

This call in turn calls SubclassDlgItem(), which does the trick of routing all messages destined to the control to our message map. 

Of course, IDC_YOUR_LISTBOX_CTRL_ID and m_listBox are orbitrary names; you should use your own instead.

⌨️ 快捷键说明

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