Click here to Skip to main content
15,924,195 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to color every letter in a Listbox diffrent Pin
Mike-Kuki28-Sep-06 2:41
Mike-Kuki28-Sep-06 2:41 
AnswerRe: How to color every letter in a Listbox diffrent Pin
Hamid_RT28-Sep-06 2:51
Hamid_RT28-Sep-06 2:51 
GeneralRe: How to color every letter in a Listbox diffrent Pin
Mike-Kuki28-Sep-06 2:58
Mike-Kuki28-Sep-06 2:58 
GeneralRe: How to color every letter in a Listbox diffrent Pin
John M. Drescher28-Sep-06 6:06
John M. Drescher28-Sep-06 6:06 
GeneralRe: How to color every letter in a Listbox diffrent Pin
Hamid_RT29-Sep-06 8:24
Hamid_RT29-Sep-06 8:24 
GeneralRe: How to color every letter in a Listbox diffrent Pin
Mike-Kuki29-Sep-06 22:09
Mike-Kuki29-Sep-06 22:09 
GeneralRe: How to color every letter in a Listbox diffrent Pin
Hamid_RT30-Sep-06 6:32
Hamid_RT30-Sep-06 6:32 
AnswerRe: How to color every letter in a Listbox diffrent Pin
drax_081528-Sep-06 2:54
drax_081528-Sep-06 2:54 
All I can say is, that you have to set your listbox to ownerdraw.
(fixed) if all listbox items have the same height an width.

Then you have to handle inside the message loop the MeasureItem and the WM_DRAWITEM
messages:

<br />
case WM_MEASUREITEM: <br />
 <br />
    lpmis = (LPMEASUREITEMSTRUCT) lParam; <br />
 <br />
    // Set the height of the list box items. <br />
    lpmis->itemHeight = 18; <br />
    return TRUE; <br />

<br />
case WM_DRAWITEM: <br />
//add your drwaing code here<br />

In the WM_DRAWITEM case you have to implement the tricky part (adding the text in different colors)

May a little help for google search.
QuestionRename a Solution Pin
Andy20228-Sep-06 2:22
Andy20228-Sep-06 2:22 
AnswerRe: Rename a Solution Pin
Hamid_RT28-Sep-06 2:39
Hamid_RT28-Sep-06 2:39 
Questionadding a wave header to a file Pin
Kiran Pinjala28-Sep-06 1:38
Kiran Pinjala28-Sep-06 1:38 
AnswerRe: adding a wave header to a file Pin
Hamid_RT28-Sep-06 2:38
Hamid_RT28-Sep-06 2:38 
QuestionHow to flash a message in MFC Pin
anjita28-Sep-06 1:05
anjita28-Sep-06 1:05 
AnswerRe: How to flash a message in MFC Pin
_AnsHUMAN_ 28-Sep-06 1:11
_AnsHUMAN_ 28-Sep-06 1:11 
AnswerRe: How to flash a message in MFC Pin
Hamid_RT28-Sep-06 2:35
Hamid_RT28-Sep-06 2:35 
AnswerRe: How to flash a message in MFC Pin
S Douglas30-Sep-06 22:29
professionalS Douglas30-Sep-06 22:29 
QuestionWindow resizing Pin
SKMukherjee28-Sep-06 0:48
SKMukherjee28-Sep-06 0:48 
AnswerRe: Window resizing Pin
Rajesh R Subramanian28-Sep-06 0:52
professionalRajesh R Subramanian28-Sep-06 0:52 
AnswerRe: Window resizing Pin
Christian Graus28-Sep-06 0:52
protectorChristian Graus28-Sep-06 0:52 
AnswerRe: Window resizing Pin
_AnsHUMAN_ 28-Sep-06 0:56
_AnsHUMAN_ 28-Sep-06 0:56 
GeneralRe: Window resizing Pin
SKMukherjee28-Sep-06 1:11
SKMukherjee28-Sep-06 1:11 
GeneralRe: Window resizing Pin
Parthi_Appu28-Sep-06 1:27
Parthi_Appu28-Sep-06 1:27 
AnswerRe: Window resizing Pin
David Crow28-Sep-06 3:01
David Crow28-Sep-06 3:01 
Questioncreating new window [modified] Pin
Anu_Bala28-Sep-06 0:24
Anu_Bala28-Sep-06 0:24 
AnswerRe: creating new window Pin
Hamid_RT28-Sep-06 2:49
Hamid_RT28-Sep-06 2:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.