Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing CLISTCTRL - property

Status
Not open for further replies.

fheyn

Programmer
Mar 22, 2001
198
DE
I'd like to change CLISTCTRL - property between multiline selection and single selection at runtime.
Has anyone out there got an idea how to do that ?
 
set single selection style:

DWORD style = GetWindowLong(m_hWnd,GWL_STYLE);
SetWindowLong(m_hWnd,GWL_STYLE,style | LVS_SINGLESEL);

set multi selection style:

DWORD style = GetWindowLong(m_hWnd,GWL_STYLE);
SetWindowLong(m_hWnd,GWL_STYLE,style & ~LVS_SINGLESEL);
 
thanks jfhuang
tried it out - it works
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top