FillConsoleOutputCharacter Unicode characters

I'm trying to use the FillConsoleOutputCharacter statement in my Visual Studio 2010 ultimate studio using the C++ Win32 system api.

My question is, is there a way to get around the standard character limit of 127?
I'll show you what I mean.

with this I can get the faded grid character(and up to 255 characters/ special characters)
cout << (char)176 << flush;

With this I can only get up to character map code 127
1
2
3
Position.X = 20;
Position.Y = 15;
FillConsoleOutputCharacter(hOut, 127, 12,  Position,  &Written);


If I go any further it displays '????????????' at the location 20, 15.

So how would I get the character 176 using FillConsoleOutputCharacter?
I need to use that because I need to make it a static background layer in the system api window.


and by the way, I am using all the required headers and stuff to make the statements work... I've debugged and they work, I only provided a snippet, if you need my whole code I will post upon asking.
Unicode uses the wchar_t type, not the char type.
Ok... So how would I implement that into the statement?
You probably don't have UNICODE defined, causing the FillConsoleOutputCharacter macro to expand to FillConsoleOutputCharacterA(), which is for normal "char". Define it and it should use the wide version (FillConsoleOutputCharacterW()) instead, which takes a wchar_t.
oh you smart cookie :D

Thanks, I got it working now, and yeah you were right on the macro expansion.

Now with your insight I can understand the MSDN link for it better now.



But for some reason the character is backwards... what I mean by that is when I use the ANSI FillConsoleOutputCharacter I get what I should get using Unicode, and vice versa.

They should give me according to the character maps
ANSI 176 = °
Unicode = ░

but its backwards lol... Ehh I dont care it works haha, probably something I'm doing wrong.
Topic archived. No new replies allowed.