views:

50

answers:

0

Part of an idea of mine are the following things:

  • Mouse access in a C# console application
  • Setting a special font for a console application (to provide the correct codepage 437 with all the RIGHT graphical stuff, not that é and à - stuff)
  • Providing a DirectX - graphical - window on top of a console application that moves with the console window

Yes, I know, this things sound strange and I can already FEEL the "zomg why do you want that? create a WPF application! create a forms application!" - "answers" and comments incoming, but please accept as a limitation that the base of what I'm doing has to be a console application for Windows 7, there is no way around it.

So, digging into this stuff so far provided me with the following ideas:

  • Mouse - access

Either some P/Invoke (intercepting incoming input from the console) OR a windows hook.

Personally, I dislike hooking, because the code usually is terrible, so I would prefer P/Invoking and intercepting.

  • Fonts

Hm, this is a hard one. I don't want to have people who use the application to have to install a font first for the console window, I want the font to be part of the assembly (as an embedded resource, preferably, so no extra files have to be provided, which would look ugly and ugliness is a no - go for me).

  • Graphics window

This is suprisingly easy, however, there are some issues with finding out where my console window really is, etc...

I know, "why do you want that?" - it's a requirement I have. All I have to do is to create something for the console, something that really rocks.

Any ideas? :-)