Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
lvchk.c
Package: shell.rar [view]
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 2k
Category:
Windows Kernel
Development Platform:
Visual C++
- /*
- * lvchk - common dialog proc handler for check-listview pages
- */
- #include "tweakui.h"
- #pragma BEGIN_CONST_DATA
- #pragma END_CONST_DATA
- /*****************************************************************************
- *
- * Checklist_OnInitDialog
- *
- * Walk the items that can live on the checklist.
- *
- * If the item can't report its state, then don't put it on the list.
- *
- *****************************************************************************/
- void PASCAL
- Checklist_OnInitDialog(HWND hwnd, PCCHECKLISTITEM rgcli, int ccli,
- UINT ids, LPVOID pvRef)
- {
- TCHAR tsz[MAX_PATH];
- int dids;
- for (dids = 0; dids < ccli; dids++) {
- BOOL f = rgcli[dids].GetCheckValue(rgcli[dids].lParam, pvRef);
- if (f >= 0) {
- LoadString(hinstCur, ids+dids, tsz, cA(tsz));
- LV_AddItem(hwnd, dids, tsz, -1, f);
- }
- }
- }
- /*****************************************************************************
- *
- * Checklist_OnApply
- *
- * Walk the items in the checklist and dork them if they have changed.
- *
- *****************************************************************************/
- void PASCAL
- Checklist_OnApply(HWND hdlg, PCCHECKLISTITEM rgcli, LPVOID pvRef)
- {
- HWND hwnd = GetDlgItem(hdlg, IDC_ICONLV);
- int cItems = ListView_GetItemCount(hwnd);
- LV_ITEM lvi;
- for (lvi.iItem = 0; lvi.iItem < cItems; lvi.iItem++) {
- BOOL fNew, fOld;
- lvi.stateMask = LVIS_STATEIMAGEMASK;
- Misc_LV_GetItemInfo(hwnd, &lvi, lvi.iItem, LVIF_PARAM | LVIF_STATE);
- fNew = LV_IsChecked(&lvi);
- fOld = rgcli[lvi.lParam].GetCheckValue(rgcli[lvi.lParam].lParam,
- pvRef);
- if (fOld >= 0 && fNew != fOld) {
- rgcli[lvi.lParam].SetCheckValue(fNew, rgcli[lvi.lParam].lParam,
- pvRef);
- }
- }
- }