Hello everyone,
I thought i'd make myself a simple little chat program as a way of learning a bit about Winsock (thanks for the tutorials Thomas, only bad thing about them is the rate they get updated!)
The Winsock part has been easy, i'm having problems with things you would think would be simple like changing the colour of text in an edit box!
I've searched the messageboard for examples, i know how to change the background colour & text colour for the whole edit box window, but it seems impossible to have lines of different coloured text within the same edit box...so one person can type in black....one in blue...etc...
Anybody know how i can do this? ....I've got a horrible feeling its only possible with RichEdit, or just writing a custom edit box or sumthing....
Any help would be great.
Kind Regards,
Lennon.
I thought i'd make myself a simple little chat program as a way of learning a bit about Winsock (thanks for the tutorials Thomas, only bad thing about them is the rate they get updated!)
The Winsock part has been easy, i'm having problems with things you would think would be simple like changing the colour of text in an edit box!
I've searched the messageboard for examples, i know how to change the background colour & text colour for the whole edit box window, but it seems impossible to have lines of different coloured text within the same edit box...so one person can type in black....one in blue...etc...
Anybody know how i can do this? ....I've got a horrible feeling its only possible with RichEdit, or just writing a custom edit box or sumthing....
Any help would be great.
Kind Regards,
Lennon.
RichEdit seems to be a sulotion..
Editcontrol can have only background color afaik
Editcontrol can have only background color afaik
Thanks for the reply Wizzra,
so it looks like standard edit box's cant handle different colour text. What about subclassing/superclassing the edit box, would it be possible then?
Lennon.
so it looks like standard edit box's cant handle different colour text. What about subclassing/superclassing the edit box, would it be possible then?
Lennon.
Unless you want to create your own custom control I suppose..
Hmmm i wanted to find out exactly what was possible with the edit control before i started thinking about trying other things.
Now i think about it tho, if i start writing custom edit control's and the like, its going to kinda distract from the fact that i started this to learn about Winsock :grin: but once i start something like this i can never seem to stop myself from trying to make it better....and better.....
Somebody shoot me!
Now i think about it tho, if i start writing custom edit control's and the like, its going to kinda distract from the fact that i started this to learn about Winsock :grin: but once i start something like this i can never seem to stop myself from trying to make it better....and better.....
Somebody shoot me!
Lennon, have a look at WM_CTLCOLOR* messages. You handle these in the parent window (ie, don't send them to the edit control).
thanks F0dder.
I've tried doing different things with the WM_CTLCOLOR* messages, namely WM_CTLCOLORDLG, but it only seems possible to change the text colour as a whole, i cant get different coloured text within the same edit box.
Cheers Lennon.
I've tried doing different things with the WM_CTLCOLOR* messages, namely WM_CTLCOLORDLG, but it only seems possible to change the text colour as a whole, i cant get different coloured text within the same edit box.
Cheers Lennon.
ach, sorry for not reading your post thoroughly enough. yeah, you'll probably have to go richedit or custom control.