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
Re: Japanese IME test code [message #15163 is a reply to message #15099] Sun, 06 April 2008 08:14 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
mobilehunter wrote on Mon, 31 March 2008 03:58

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


Looks OK to me, but I cannot check it Smile

If this gets approval from any other CJK user, I will paste it in gladly Smile

Mirek
 
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 23 13:01:38 GMT+2 2026

Total time taken to generate the page: 0.01067 seconds