整理 CListCtrl基本操作

2021-09-30 08:52:51 字數 1853 閱讀 1775

<2011_0217>

將題頭定義成配置陣列, 便於維護

typedef struct _tag_list_ctrl_title

}tag_list_ctrl_title, *ptag_list_ctrl_title;

/*

[2013-08-31 17:13:07] dwcntprocesses = 0x6d

[2013-08-31 17:13:07]

process nindex[64]

dwpid [5476]

pe os [x86]

szname [nusb3mon.exe]

sizeofimage [0x1c000]

entrypoint [0x004034ce]

lpbaseofdll [0x00400000]

*/tag_list_ctrl_title g_arrconfigprocesslist =

;

int cviewpe::ctrlinit()

/// 禁止自畫

m_processlist.setredraw(false);

m_processlist.modifystyle(

lvs_icon | lvs_list | lvs_report | lvs_smallicon ,

0);m_processlist.modifystyle(0, lvs_report);

m_processlist.setextendedstyle(lvs_ex_gridlines);

dwstyle = m_processlist.getextendedstyle();

dwstyle |= lvs_ex_fullrowselect;

m_processlist.setextendedstyle(dwstyle);

/// 插入題頭

nsize = sizeof(g_arrconfigprocesslist)

/ sizeof(tag_list_ctrl_title);

for (nindex = 0; nindex < nsize; nindex++)

/// 恢復自畫

m_processlist.setredraw(true);

return 0;

}

<2011_0410>

選中checkbox時,也選中該項. 預設處理是不選擇該項的,只是選中checkbox

<2013_0901>

基類 .h

protected:

declare_message_map()

public:

virtual bool onnotify(wparam wparam, lparam lparam, lresult* presult);

virtual bool processnotifymsg(wparam wparam, lparam lparam, lresult* presult);

基類 .cpp

bool cviewnormal::onnotify(wparam wparam, lparam lparam, lresult* presult)

子類.cpp

bool cviewpe::processnotifymsg(

wparam wparam,

lparam lparam,

lresult* presult)

}return brc;

}

CListCtrl的基本用法

一 風格 clistctrl有四種風格 lvs icon 大圖示 lvs smallicon 小圖示 lvs list 列表 lvs report 詳細資料,最常用的就是這種風格了 風格設定在屬性頁可以直接設定,也可以用函式setview來設定。二 設定擴充套件風格 常見的擴充套件風格有 lvs e...

ceph基本操作整理

啟動osd mon程序 start ceph osd id x start ceph mon id yyy 關閉osd mon程序 stop ceph osd id x stop ceph mon id yyy 檢視osd的狀態 status ceph osd id x scale up 同一節點上...

整理 CFileDialog基本操作

include stdafx.h include cmyfiledialog.h ifdef debug define new debug new undef this file static char this file file endif using namespace std int fno...