我尝试获取listview
的内容,但我无法理解这句话;
static Int32 LVM_FIRST = 4096;
这是什么意思?为什么是4096?
static Int32 LVM_FIRST = 4096;
static Int32 LVM_DELETEITEM = (LVM_FIRST + 8);
static Int32 LVM_SORTITEMS = (LVM_FIRST + 48);
代码链接为http://www.4byte.cn/question/463761/get-items-from-windows-task-manager-process-list-c.html
答案 0 :(得分:1)
这是要在win32 api调用中发送到hWnd
引用的窗口的Windows消息:
Int32 apiSendMessage(Int32 hWnd, Int32 wMsg, Int32 wParam, string lParam);
您将其称为:
apiSendMessage(lhWndMyWindow, LVM_DELETEITEM,0,"0");
OR
apiSendMessage(lhWndMyWindow, 5003,0,"0");
常量只是用户友好的方式来编码要发送到窗口的消息。最后两个参数通常包含基于发送消息的详细数据指针。
此外,看起来他们正在以某种模式对齐常量(L)ist(V)iew(消息)_XXXX调用