글꼴출력 ㅇ?
미쁘다
오류해결
오류해결
질문 내용 :
#include stdio.h
#include conio.h
#include windows.h
#include string.h
void PrintText(HDC,int,int,int,char*,char*);
int main(void)
{
HDC hdc;
HWND hWnd;
system(title ABC);
hWnd = FindWindow(NULL,TEXT(ABC));
hdc = GetDC(hWnd);
PrintText(hdc,30,10,10,궁서,Hello, World);
ReleaseDC(hWnd,hdc);
getch();
return 0;
}
void PrintText(HDC hdc, int Size, int x, int y, char *Text, char *String)
{
HFONT MyFont, OldFont;
MyFont = CreateFont(Size,0,0,0,0,0,0,0,HANGEUL_CHARSET,0,0,0,FF_ROMAN | VARIABLE_PITCH,(LPCWSTR)Text);
OldFont = (HFONT)SelectObject(hdc,MyFont);
TextOut(hdc,x,y,(LPCWSTR)String,strlen(String));
SelectObject(hdc,OldFont);
DeleteObject(MyFont);
}
왜 안되죠...;;;
쓰레기값이 출력되요
-
잇힝
캐스트 연산자로 유니코드 변환을 할 수 있다면 얼마나 편하겟나요 ㅡㅡ
-
두메꽃
.....
TextOutA(... 해보세요.
LPCWSTR 로 캐스팅 할 필요없으니 지우시고요.
그리고 이 게시글은 지우시고요.