Topics

Colours other than black for editbox text?

general@...
 

Hi, can anyone tell me if it is possible to change the colour of text displayed in the contents of a Windows dialog box editbox?  Perhaps an extra parameter in the SetDlgItemText call?  I have an application where data from an editbox is sent to a device via a COM port and it would be useful to be able to change the colour to indicate if the data has been sent.  Thanks in advance.

dai_m_leeds
 

I think you will need to use a richedit control, if I remember past conversations...

Best wishes,

D

general@...
 

Thanks for the suggestion.  From what I can gleam from the Microsoft documentation I think you are right.  What I can't work out is exactly how to use the richedit control.  Presumably one sets it up with the PROC_dlgitem or PROC_dlgctrl?  Has this already been covered in another thread?  Can you point me to any more specific information or examples?  Thanks.

Hans van der Hoeven
 

general@...
 

Thanks, that's exactly what I was looking for.  Should have checked the wiki first....
Simon

dai_m_leeds
 

Hi Simon,

Subclassing may be more than you need/want: you can simply include richedit controls in your standard dialogue boxes, as discussed here:
http://www.bbcbasic.co.uk/wiki/doku.php?id=using_20rich_20edit_20controls
which may give you an easier solution to your problem.

Best wishes,

D

general@...
 

Yes, I'd come to the same conclusion.  Happly playing around with this after reading Richard's great Wiki page.  The subclassing looks interesting for a few other projects I have on the go.  Anyway, thanks again for the pointers.  Simon