Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
0 users currently in Programming. |
Acmlm's Board - I3 Archive - Programming - Various text drawing methods are ignoring font colour | New poll | | |
Add to favorites | Next newer thread | Next older thread |
User | Post | ||
HyperHacker Star Mario Finally being paid to code in VB! If only I still enjoyed that. <_< Wii #7182 6487 4198 1828 Since: 11-18-05 From: Canada, w00t! My computer's specs, if anyone gives a damn. STOP TRUNCATING THIS >8^( Last post: 6432 days Last view: 6432 days |
| ||
Originally posted by MS Documentation Or not. TextOut, ExtTextOut, DrawText, etc, they all seem to ignore the text and background colour for the most part and just choose arbitrary colours. Generally black on white, but if I set the background to dark blue (0, 0, 127) it becomes white on black. Tried setting a font, pen colour, brush colour etc, nothing works. //Some global variables
You can see I've tried pretty much every method to no avail. I can set the text colour and read it back again, but the text drawing routines simply ignore it. |
|||
sloat Since: 11-18-05 From: Delaware, US Last post: 6535 days Last view: 6535 days |
| ||
Originally posted by HyperHacker I'm pretty sure this is the issue. You should get the DC of the current window (from the hWnd param) and use that to create both the memory DC and Bitmap. Originally posted by Buried in MSDN |
|||
HyperHacker Star Mario Finally being paid to code in VB! If only I still enjoyed that. <_< Wii #7182 6487 4198 1828 Since: 11-18-05 From: Canada, w00t! My computer's specs, if anyone gives a damn. STOP TRUNCATING THIS >8^( Last post: 6432 days Last view: 6432 days |
| ||
Ah, thanks. Using the window's DC in both CreateCompatibleDC and CreateCompatibleBitmap did it. I thought it might have been monochrome but I could swear I've done the same before and it worked.
Anyway since I'm here, is there a way to disable the mouse entirely? I'd use BlockInput() but that disables the keyboard too and it becomes enabled again when the program closes. I want to write a program that just prevents any program from responding to the mouse, even after it's closed, until it's run again to re-enable it. Reason being I like to use my computer as an alarm clock, so I'd like to just turn the monitor off through software when I set the alarm and have it come back on when the alarm goes off or when I press a key. I can do that but my mouse likes to randomly send "wheel scrolled" messages when it's just sitting there, turning the monitor back on in the middle of the night. |
Add to favorites | Next newer thread | Next older thread |
Acmlm's Board - I3 Archive - Programming - Various text drawing methods are ignoring font colour | | |