sasabunetic
asked on
List Box color
Hi!
Check next code:
CListBox *pCLB;
char szB [256];
pCLB = (CListBox *) GetDlgItem (IDC_TESTPLACE_LIST); // get List-Box
sprintf (szB, "%s", MessageText);
if (szB[0] != 0) {
pCLB->InsertString(-1, &szB[0]);
}
Text is now displayed only in black color. How can I set different text colors in CListBox?
Thanks
Sasa
Check next code:
CListBox *pCLB;
char szB [256];
pCLB = (CListBox *) GetDlgItem (IDC_TESTPLACE_LIST); // get List-Box
sprintf (szB, "%s", MessageText);
if (szB[0] != 0) {
pCLB->InsertString(-1, &szB[0]);
}
Text is now displayed only in black color. How can I set different text colors in CListBox?
Thanks
Sasa
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
A featured sample can be found at : http://www.codeproject.com/combobox/xlistbox.asp