|
alternative way text output problem.... |
visual00
Member #15,194
June 2013
|
hi guys i'm south korean allegro user i am not good at english. Sorry, but I don't speak English well. (please understand even if you can't understand me clearly) ============================================================================= so alternative way windows api text output function use by the way new problem outbreak... 1#include <allegro5/allegro.h>
2#include <allegro5/allegro_native_dialog.h>
3#include <allegro5/allegro_ttf.h>
4#include <allegro5/allegro_font.h>
5#include <allegro5/allegro_windows.h>
6
7#define ScreenWidth 800
8#define ScreenHeight 600
9
10int main(int argc, char **argv)
11{
12 ALLEGRO_DISPLAY *display = NULL;
13
14 HDC hdc;
15 PAINTSTRUCT ps;
16 HWND hWnd;
17
18 TCHAR *str= TEXT("Englist,한글");
19
20 al_init();
21 al_set_new_display_flags(ALLEGRO_WINDOWED);
22 display = al_create_display(ScreenWidth,ScreenHeight);
23 al_set_window_position(display,200,100);
24 al_set_window_title(display,"String Output Test");
25
26 hWnd = al_get_win_window_handle(display);
27 hdc = GetDC(hWnd);
28
29 al_clear_to_color(al_map_rgb(255,255,255));
30
31 TextOut(hdc,0,0,str,lstrlen(str));
32
33 MessageBox(hWnd,"window","stop",MB_OK);
34
35 al_flip_display();
36 al_rest(3.0);
37 ReleaseDC(hWnd,hdc);
38 al_destroy_display(display);
39 return 0;
40}
program result... 1. 2. 3. oh.. text output problem help..please..??? |
beoran
Member #12,636
March 2011
|
Allegro's font output works and can make korean so you don't need this solution. Please look back in the other thread, I found the problem. The font you used does not have Korean characters in it. |
|