Search found 4 matches

by zhaojs
Fri Jun 20, 2008 9:48 am
Forum: Code Snippets
Topic: A simple way to support IME
Replies: 6
Views: 3335

rogerborg wrote:What would lead you to believe that it might not be?
Are you saying that "if (font){ TextBox1->setOverrideFont(font); }"?

This is just want faster. Sometimes don't need to create a new size of the font, you can use the already existing.
by zhaojs
Fri Jun 20, 2008 9:42 am
Forum: Code Snippets
Topic: A simple way to support IME
Replies: 6
Views: 3335

lester wrote:is it windows only?
I only tested on Windows, don't use Windows API, should be easy to Linux.
by zhaojs
Thu Jun 19, 2008 3:15 am
Forum: Code Snippets
Topic: A simple way to support IME
Replies: 6
Views: 3335

Change font size:
IGUIFontVector* font=(IGUIFontVector*)TextBox1->getOverrideFont();
font=font->getNewSizeFont(newWidth,newHeight);
if (font){ TextBox1->setOverrideFont(font); }
by zhaojs
Sun Jun 15, 2008 2:59 am
Forum: Code Snippets
Topic: A simple way to support IME
Replies: 6
Views: 3335

A simple way to support IME

A simple way to support IME, modify CIrrDeviceWin32.cpp, in WinProc function, add the following code: case WM_IME_CHAR: dev = getDeviceFromHWnd (hWnd); If (dev) ( Event.EventType = irr:: EET_KEY_INPUT_EVENT; Event.KeyInput.PressedDown = true; Event.KeyInput.Key = irr:: KEY_OEM_CLEAR; Event.KeyInput....