From: Allan Bruce on 18 Aug 2005 04:09 "TJ" <someone(a)somewhere.com> wrote in message news:0b2dnZ2dnZ0LnCK3nZ2dnXVQnt6dnZ2dRVn-0J2dnZ0(a)midco.net... > Try: > > heditdc=GetDC(hedit); > SetBkMode(heditdc,TRANSPARENT); > SetTextColor(heditdc,RGB(255,0,0)); > > or: > > heditdc=GetDC(hedit); > SetBkColor(hedit,RGB(255,0,0)); > SetBkMode(heditdc,OPAQUE); > > With it being a readonly edit control I don't know which would be the > proper way of doing it. The background can't be changed with a readonly > edit control but the text color can be. > Actually, come to think of it - this looks similar to win32 code for changing text colour only if using DrawText() or similar APIs. I am using EM_SETCUSEL/EM_REPLACESEL to add the text to my control. In win32 I use EM_GET/SETCHARFORMAT to change the text colour, but it doesnt appear to be supported in win32. Allan
From: TJ on 18 Aug 2005 07:22 Yeah it's a beast when it comes to things like this. Come to think of it I don't know if I've ever seen non-black text in any edit control for any program I've run on PPC... Hope you can find the answer. I've googled the hell out of it and couldn't find anything but what I already knew. > Actually, come to think of it - this looks similar to win32 code for > changing text colour only if using DrawText() or similar APIs. I am using > EM_SETCUSEL/EM_REPLACESEL to add the text to my control. In win32 I use > EM_GET/SETCHARFORMAT to change the text colour, but it doesnt appear to be > supported in win32. > > Allan > >
From: Allan Bruce on 18 Aug 2005 07:28 "TJ" <someone(a)somewhere.com> wrote in message news:Cf2dnY-C-oLG8pneRVn-tw(a)midco.net... > Yeah it's a beast when it comes to things like this. Come to think of it I > don't know if I've ever seen non-black text in any edit control for any > program I've run on PPC... Hope you can find the answer. I've googled the > hell out of it and couldn't find anything but what I already knew. > > Oh well, guess I'll have to live with black text then! Thanks very much for your help Allan
First
|
Prev
|
Pages: 1 2 3 Prev: SD Card serial number Next: serial port connection between PocketPC and winxp |