Click here to Skip to main content
15,891,777 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to increase the border/frame width for ListBox in win32?

What I have tried:

C++
CRect p(7, 35, 300, 200);

DWORD  m_ListStyle =WS_CHILD|WS_VISIBLE|LBS_NOTIFY|WS_VSCROLL|WS_HSCROLL|WS_BORDER;

m_ListStyle ^= LBS_SORT;

m_ctrlListBox.Create(m_ListStyle , p, this,IDC_LIST);

m_ctrlListBox.SetFont(GetParent()->GetFont());
Posted
Updated 27-Dec-17 22:20pm

1 solution

The ListBox basic style is defined in the class definition in Windows, and the values are fixed. You could try playing with different Window Styles (Windows)[^] but that still limits you to only one or two choices.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900