daviddr

¤p¾Ç¥Í(200/1000)
UID 4114704
ºëµØ
0
¿n¤À 533
©«¤l 536
¼ç¤ô 894 ¦Ì
¾\ŪÅv 20
µù¥U 2008-5-3 ¨Ó¦Û Taiwan
|
|
|
ºû§J´µ°Q½×°Ï
³oµ{¦¡¯u¬O¦³½ì~
©³¤U¬O§Ú¥é·Ó tom6109 ¤èªk¼gªº Console µ{¦¡~
ª½±µ¥Î VC++ ½sͧY¥i¡C
#include <windows.h>
#include <stdio.h>
void main ()
{
wchar_t text[] = L"Æga!"; //«ü©w¤å¦r
wchar_t face[] = L"²Ó©úÅé"; //«ü©w¦rÅé
int size = 32; //«ü©w¦r§Î¤j¤p
int x,y, len = (sizeof text/sizeof*text)-1;
SetConsoleTitle (L"ASCII Art");
HDC hdc = GetDC (FindWindow (0, L"ASCII Art"));
HFONT font = CreateFont (size,0,0,0,FW_BOLD,0,0,0,0,0,0,0,0,face);
HGDIOBJ oldFont = SelectObject (hdc, font);
SetBkColor (hdc, 50);
SetTextColor (hdc, 0); //¶Â¦â
TextOut (hdc, 0,0, text, len);
FILE* f = fopen ("text.txt","wt"); //¶}ÀÉ
for (y=0; y<size; y++, fputc('\n',f))
for (x=0; x<len*size; x++)
!GetPixel (hdc,x,y)? fprintf(f,"¡½"): fprintf(f,"¡¼");
fclose (f);
SelectObject (hdc, oldFont);
DeleteObject (font);
DeleteDC (hdc);
}
¿é¥Xµ²ªG:
¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼
¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼
¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡½¡¼¡¼¡¼¡¼¡¼¡¼¡½¡½¡½¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡½¡½¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼
¡¼¡¼¡½¡½¡½¡½¡½¡½¡½¡½¡¼¡¼¡½¡½¡½¡½¡½¡¼¡¼¡¼¡¼¡¼¡½¡½¡½¡½¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼
¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡½¡¼¡¼¡½¡½¡¼¡¼¡½¡½¡½¡¼¡¼¡¼¡½¡¼¡¼¡¼¡½¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡½¡¼¡¼¡¼
¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡½¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡½¡½¡½¡¼¡¼
¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡½¡¼¡¼¡¼¡½¡½¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡½¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡½¡½¡½¡¼¡¼
¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡¼¡½¡½¡¼¡ [ ÂsÄý§¹¾ã¤º®e½Ð¥ýµù¥U©Îµn¤J·|û¡C]
|
|
|