Starting with Windows 95, Microsoft added new common controls. One of the most popular is the ListView control, which can be seen in the Windows Explorer and the Windows desktop itself.
This control supports several modes, or views, which include large icon, small icon, and report. Report view lists items, one per row, with any number of columns per row, and a column header at the top of each column.
One thing that can be annoying at times, however, is that, although the ListView control allows any number of columns, the user can only select ListView items by clicking in the left-most column.
You can overcome this by sending an LVM_SETEXTENDEDLISTVIEWSTYLE message to the ListView control. This message takes a bit mask of the styles you want to alter and the new value of those styles.
::SendMessage(ListCtrl.m_hWnd, LVM_SETEXTENDEDLISTVIEWSTYLE,
LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);
Note that better support for these newer styles in now available in Visual C++ version 6. Use caution, however. The reason the LVS_EX_FULLROWSELECT style was not documented in early releases of Windows 95 references is because it was not supported until version 4.70 of the common controls library (comctl32.dll). This means that unless you know your users will be using a newer version of the common controls, this functionality will not work on their systems.