Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
0 users currently in Programming. |
User | Post |
HyperHacker Posts: 3999/5072 |
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. |
sloat Posts: 20/20 |
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 Posts: 3996/5072 |
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. |