ListView标题平面显示

八月秋初夜

八月秋初夜

2016-02-19 16:53

有了下面这个ListView标题平面显示教程,不懂ListView标题平面显示的也能装懂了,赶紧get起来装逼一下吧!

  

Public Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" _  (ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, _ByVal lParam As Long) As LongPublic Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _  (ByVal hwnd As Long, ByVal nIndex As Long) As LongPublic Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _  (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As LongPublic Const GWL_STYLE = (-16)Public Const LVM_FIRST = &H1000Public Const LVM_GETHEADER = (LVM_FIRST + 31Public Const HDS_BUTTONS = &H2 '执行下列代码放在你的创建ListView代码中  Dim r As Long  Dim style As Long  Dim hHeader As Long 'get the handle to the listview header  hHeader = SendMessageLong(ListView1.hwnd, LVM_GETHEADER, 0, ByVal 0&) 'get the current style attributes for the header  style = GetWindowLong(hHeader, GWL_STYLE) 'modify the style by toggling the HDS_BUTTONS style  style = style Xor HDS_BUTTONS   'set the new style and redraw the listview  If style Then   r = SetWindowLong(hHeader, GWL_STYLE, style)  End If

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/bianchengyuyan/)
展开更多 50%)
分享

猜你喜欢

ListView标题平面显示

编程语言 网络编程
ListView标题平面显示

listview 选中高亮显示实现方法

编程语言 网络编程
listview 选中高亮显示实现方法

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

如何制作平面式列头的Listview

编程语言 网络编程
如何制作平面式列头的Listview

如何在标题栏显示框架内页面的标题

Web开发
如何在标题栏显示框架内页面的标题

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

实现标题条的显示与隐藏

C语言教程 C语言函数
实现标题条的显示与隐藏

Word怎么显示隐藏的标题3?

word
Word怎么显示隐藏的标题3?

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

利用C#实现分布式数据库查询

利用C#实现分布式数据库查询

电脑鼠标卡出现声音怎么办

电脑鼠标卡出现声音怎么办
下拉加载更多内容 ↓