Home > Software engineering >  MFC listbox control
MFC listbox control

Time:09-17

Excuse me I initialize the listbox is set up for m_listbox. Setcursel (0) to select the option "0

How can I have the blue bar shows?
To set default options currently in the Windows 7 no blue article

Need to do?

Can you give examples?
thank you

CodePudding user response:

https://www.baidu.com/s? Wd=custom painting + ListBox& Ie=utf-8


CodePudding user response:

M_ListBox. SendMessage (LB_SETCURSEL, 0);

CodePudding user response:

Add data first, then choose
 
M_ListBox. AddString (_T (" ABCD "));
M_ListBox. AddString (_T (" 1234 "));
M_ListBox. SetCurSel (0);


CodePudding user response:

To display the blue bar, listbox must have focus. If you want to focus, also showed blue, the estimates from draw controls
  • Related