Click here to Skip to main content
16,016,229 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Modal and modeless dialogs Pin
Wim Engberts28-Sep-06 3:01
Wim Engberts28-Sep-06 3:01 
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 
I dont know why you want to use it anyway its possible but you need to a little work:
1-you need to derived CListBox and declare WM_DRAWITEM on it (if you dont know how to use it you can see previous links)
2- On WM_DRAWIEM when you want to write items with TextOut or DrawText you must declare a loop
for each item for example you have three items on your listbox "one" "two" "three"
you get your string and when you want to show these items you need to a loop like this

for(int i=0;i<m_Str.GetLength();i++)//for read character to character of a string<br />
{<br />
SetTextColor(RGB(0,0,120));// if you want to use a constant color <br />
pDC->TextOut(you need to calculate x,you need to calculate y, m_str[i]);	<br />
<br />
//For calculate location you can use the rect in this function (LPDRAWITEMSTRUCT)<br />
}<br />
Smile | :)




WhiteSky

AnswerRe: How to color every letter in a Listbox diffrent Pin
drax_081528-Sep-06 2:54
drax_081528-Sep-06 2:54 
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 

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.