Jump to content

  • Log In with Google      Sign In   
  • Create Account





Things Up Microsoft's Sleeve - Console Graphics

Posted by adeyblue, 08 October 2012 · 717 views

windows trivia
CreateConsoleScreenBuffer, what a fabulous function. You ask it nicely, and it gives you as many 'console window content' buffers as you want. With the other supporting functions it's everything you need for a AAA game (ascii-art-animation natch). But backup a minute here. what's that mysteriously reserved parameter for and why is there a flags argument with a weasely worded "only supported screen buffer type"? Sounds like there's something else it can (or at least could) do.

Sure enough, there is. For the function really doesn't just have one defined buffer type, it has two. The second is the truthfully, if optimistically, named CONSOLE_GRAPHICS_BUFFER. Now doesn't that sound fancy? I mean, non-ascii graphics in the console, groovy!

The creation of this 'graphics buffer' works via the magic of that bogus 'reserved' last parameter. Forget about your regions and device contexts though, where we're going is much more low-tech.

Read the rest on Just Let It Flow




January 2015 »

S M T W T F S
    123
45678910
11121314151617
18192021222324
2526 27 28293031
PARTNERS