vc6.0中怎样用listcontrol控件显示系统中安装了哪些程序及路径

来源:百度知道 编辑:UC知道 时间:2024/06/15 06:21:39
用Listbox也可以

分太少啦

注册表里面有一项,不过我不知道在哪里^_^

读取注册表,路径是 : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\

枚举后,循环插入就可以了

CListBox * list=(CListBox *)GetDlgItem(IDC_LIST1);
list->ResetContent();
FARPROC EnumProcInstance=MakeProcInstance((FARPROC)EnumWindowsProc,
AfxGetInstanceHandle());
EnumWindows((WNDENUMPROC)EnumProcInstance,
(LPARAM)list);
FreeProcInstance(EnumProcInstance);
CenterWindow();

这是listbox的实现 你自己再改改 呵呵