List control with single / double separator lines New Hampshire

Placing row and column seperators in a listview

Local Companies

Jinks Technology Management
(603) 882-8222
74 Northeastern Blvd Ste 22A
Nashua, NH
Mid Range Education
(603) 471-1877
10 Chestnut Dr Unit K
Bedford, NH
Anderson Systems Mgmt Assocs Inc
(603) 894-6799
63 Range Rd
Windham, NH
Infospan Technologies Inc
(603) 821-7490
20 Trafalgar Sq Ste 462
Nashua, NH
Promobubble
(603) 594-9200
1 Indian Head Plz
Nashua, NH
QED Connect
(603)881-3884
2 Townsend West Unit 1
Nashua, NH
Small Business Computers of NE Inc
(603) 695-9090
25 Lowell St
Manchester, NH
Serasoft
(603) 485-3700
35 Post Rd
Hooksett, NH
Sai Peoples Solution Inc
(603) 626-7280
1155 Elm St
Manchester, NH
Complete Computing Solutions of New England
(603) 880-0482
31 Syracuse Rd
Nashua, NH

provided by: 
Originally published at Internet.com


This article describes how to add separator lines (single line or double line) to a list control derived from CListCtrl. This technique requires that the list control is owner drawn. This article also demonstrates how to prevent row selection in a list control.

grid_separator.gif (2590 bytes)

How to do it?



Let's assume that we have a class TVisualListCtrl derived from CListCtrl. Objects of this class correspond to list control resources (each list control must be ownerdrawn). In order to implement support for separator lines, we have to add several features to this class.

Step 1.

Add a public enum type containing the separator line identifiers and 2 public functions for inserting a separator line and checking whether the item is separator or not. class TVisualCtrlList : public CListCtrl { public: enum ESeparator { SEPARATOR_SINGLE, SEPARATOR_DOUBLE }; ..... public: .... BOOL IsSeparator(int row); int InsertSeparator(int row, ESeparator separator = SEPARATOR_SINGLE); };

Also create 2 constant strings (within a class or as local variables in a .cpp implementation file) which are inserted into the list control. These strings have a special meaning to the class implementation since they are actually aliases to separator lines. const CString SingleSeparator = _T("--"); const CString DoubleSeparator = _T("==="); ...

Read article at Internet.com site

Featured Local Company

QED Connect

(603)881-3884
2 Townsend West Unit 1
Nashua, NH
http://www.qedconnect.com

QED Connect, Inc. is an information security Software-as-a-Service (SaaS) provider that gives organizations visibility, management and control of activity on all their computers, laptops and wireless devices. The company’s popular SaaS, Omni Manager, is an affordable way to monitor and manage how employees are using company computers and the Internet at any time, from any location in the world. This solves the problems created by today’s ‘virtual’ work environment of branch offices, remote workers and traveling employees. Omni Manager is a web-hosted software application that includes e-mail and Internet filtering and blocking, antivirus, instant messaging management, asset tracking, application usage monitoring and policy management. ROI is delivered by employee productivity gains, cost savings and improved operational efficiencies.


Topics: 
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML