-
-
Save mattn/205b43f05bc2ec1275cb8a813bd0dc64 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <stdio.h> | |
int | |
main(int argc, char* argv[]) { | |
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE); | |
CHAR_INFO ci[6] = {}; | |
COORD buffer_size = { 6, 1 }; | |
COORD start_coord = { 0, 0 }; | |
SMALL_RECT sr = { 0, 0, 80, 25 }; | |
SHORT white = FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED; | |
ci[0].Char.UnicodeChar = L'あ'; | |
ci[0].Attributes = white; | |
ci[1].Char.UnicodeChar = L' '; | |
ci[1].Attributes = white; | |
ci[2].Char.UnicodeChar = L'い'; | |
ci[2].Attributes = white; | |
ci[3].Char.UnicodeChar = L' '; | |
ci[3].Attributes = white; | |
ci[4].Char.UnicodeChar = L'う'; | |
ci[4].Attributes = white; | |
ci[5].Char.UnicodeChar = L' '; | |
ci[5].Attributes = white; | |
WriteConsoleOutputW(h, (CHAR_INFO*)ci, buffer_size, start_coord, &sr); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment