How to Use CHeaderCtrl Filter
来源:互联网 发布:java流读取 编辑:程序博客网 时间:2024/05/07 11:50
How to Use CHeaderCtrl Filter
1,添加标准的Filter控件
- // The pointer to my header control.
- extern CHeaderCtrl* pmyHeaderCtrl;
- // HDS_FILTERBAR Is The New Style...
- //
- pHeader -> ModifyStyle( 0, HDS_FILTERBAR ); // Add The FilterBar Style
2,发送HDN_FILTERCHANGE消息
- void OnHdnFilterChange(NMHDR *pNMHDR, LRESULT *pResult)
- {
- // This feature requires Internet Explorer 5 or greater.
- // The symbol _WIN32_IE must be >= 0x0500.
- LPNMHEADER phdr = reinterpret_cast<LPNMHEADER>(pNMHDR);
- // TODO: Add your control notification handler code here
- HDTEXTFILTER hdTFilter;
- CHeaderCtrl *pHeader = GetHeaderCtrl();
- HDITEM hdItem;
- TCHAR cFilter[128];
- ZeroMemory( cFilter, sizeof( cFilter ) );
- hdItem.mask = HDI_FILTER;
- hdTFilter.pszText = cFilter; // Set Buffer For Filter
- hdTFilter.cchTextMax = sizeof( cFilter ); // Set Size Of Buffer
- hdItem.type = HDFT_ISSTRING;
- hdItem.pvFilter = &hdTFilter;
- pHeader->GetItem( 0, &hdItem ); //获取0项的数据
- *pResult = 0;
- }
3,Filter通过响应HDN_FILTERCHANGE消息
- 添加消息映射ON_NOTIFY(HDN_FILTERCHANGE, 0, OnHdnFilterChange)
- 添加消息函数OnHdnFilterChang
- void OnHdnFilterChange(NMHDR *pNMHDR, LRESULT *pResult)
- {
- // This feature requires Internet Explorer 5 or greater.
- // The symbol _WIN32_IE must be >= 0x0500.
- LPNMHEADER phdr = reinterpret_cast<LPNMHEADER>(pNMHDR);
- // TODO: Add your control notification handler code here
- *pResult = 0;
- }
相关的结构体
- typedef
- How to Use CHeaderCtrl Filter
- How To Use DataGird
- how to use typedef
- how to use gz
- How to use chkconfig
- How to use ,,,,
- how to use dialog
- How to use UIDs
- How to use dmalloc
- How to use abld
- How to use BSTR
- How to use Ant
- how to use mstsclib
- how to use gcc
- how to use thread
- how to use ffmpeg
- How to use RDebug
- How to use regex
- 一小时计划
- index_join:
- index_combine:
- ASP.NET 2.0服务器控件与组件开发高级编程:为自定义控件添加设计时属性
- 很适合我们这个年龄看的一篇文章
- How to Use CHeaderCtrl Filter
- 43个热门Flex和ActionScript 3.0 APIs,技巧和工具
- 构建XML的架构文件XSD
- 上海旧书市场
- 将WORD类型文件名(即UNICODE编码方式)转化为ANSI编码输出
- Windows自定义控制库-commctrl.dll和comctl32.dll
- 单实例(Singleton) single instance 模式
- 使用 jQuery (1)
- 网络语料正文的识别/抽取规则 标签密度判定法