U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » Japanese IME test code
Japanese IME test code [message #15099] Mon, 31 March 2008 09:58 Go to previous message
mobilehunter is currently offline  mobilehunter
Messages: 87
Registered: November 2006
Member
Hope Mirek and other can check these code
case WM_IME_STARTCOMPOSITION:
	{
		HWND hwnd =GetHWND();
		POINT pt;
		GetCaretPos(&pt);// I don't know the properway to get this in UPP way.
		HIMC hIMC = ImmGetContext(hwnd);
		COMPOSITIONFORM cf;
		
/*These lines up to us to make ime font match to current font, or just the font size.
		FontInfo fi = Draw::GetStdFont().Info();
		LOGFONT lf;
		HFONT hfont = fi.GetHFONT(); //i'm sorry to add this function manually to Draw.h, since i don't know how to get HFONT 
		GetObject(hfont, sizeof(LOGFONT), &lf);
		ImmSetCompositionFont(hIMC, &lf);
			
		cf.dwStyle = CFS_POINT;
		cf.ptCurrentPos.x = pt.x;
		cf.ptCurrentPos.y = pt.y;
		ImmSetCompositionWindow(hIMC, &cf);
		ImmReleaseContext(hwnd, hIMC);
	}
break;


Above code will make IME window position start at current caret position.

Please fix above codes, since i don't have deep understanding of UPP codes.

Test with GUI17a sample and UWord

[Updated on: Mon, 31 March 2008 10:00]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to retrieve current language?
Next Topic: CJK characters can be higlighted as keywords
Goto Forum:
  


Current Time: Tue Jun 16 08:46:59 GMT+2 2026

Total time taken to generate the page: 0.00746 seconds