I’ve been doing too much Java at work recently, so in the interest of keeping my hand in with some low-level C++, I picked up the code for my mobile twitter client, TwitToday, again.
I originally wrote it at a hackday, but I’ve since come back to tweak it a couple of times to get it to spawn background worker threads, add SIP on-screen keyboard support, and improve support for sending special and accented characters.
After another evening of tweaking, I’ve added a few new minor features:
Transparent text box
When not in use, the text box is now transparent. When it has focus, it is coloured in white as usual.
A few people commented that a bright white text box could dominate a dark Today screen too much, so this is hopefully a nice aesthetic improvement.
I did this by creating a custom windows procedure for the text box.
The windows procedure needed to handle a couple of events:
Handling WM_PAINT
by using SetBkMode
to make the text box TRANSPARENT
Handling WM_ERASEBKGND
by using TODAYM_DRAWWATERMARK
to draw the background over the text control’s rectangle.