Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: 13975
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: Sun Apr 28 07:58:53 CEST 2024

Total time taken to generate the page: 0.03891 seconds