Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » Japanese IME test code
Re: Japanese IME test code [message #15220 is a reply to message #15170] |
Thu, 10 April 2008 05:27   |
mobilehunter
Messages: 87 Registered: November 2006
|
Member |
|
|
Another update for RichEdit control, to make the font size of IME window follows RichEdit's font size.
void RichEdit::DisplayIMEWindow()
{
HWND hwnd = this->GetParent()->GetHWND();
POINT pt;
COMPOSITIONFORM cf;
LOGFONT lf;
HIMC hIMC = ImmGetContext(hwnd);
GetCaretPos(&pt);
int zoomHeight = GetZoom() * tabs(formatinfo.GetHeight());
ImmGetCompositionFont(hIMC,&lf);
lf.lfHeight = -zoomHeight;
ImmSetCompositionFont(hIMC, &lf);
cf.dwStyle = CFS_POINT;
cf.ptCurrentPos.x = pt.x;
cf.ptCurrentPos.y = pt.y;
ImmSetCompositionWindow(hIMC, &cf);
ImmReleaseContext(hwnd, hIMC);
}
And for EditField.
void EditField::DisplayIMEWindow()
{
HWND hwnd = this->GetParent()->GetHWND();
POINT pt;
COMPOSITIONFORM cf;
LOGFONT lf;
HIMC hIMC = ImmGetContext(hwnd);
GetCaretPos(&pt);
Size sz = GetSize();
int yy = GetTy();
ImmGetCompositionFont(hIMC,&lf);
lf.lfHeight = font.Info().GetHeight()+yy;
ImmSetCompositionFont(hIMC, &lf);
cf.dwStyle = CFS_POINT;
cf.ptCurrentPos.x = pt.x;
cf.ptCurrentPos.y = pt.y-yy;
ImmSetCompositionWindow(hIMC, &cf);
ImmReleaseContext(hwnd, hIMC);
}
[Updated on: Thu, 10 April 2008 05:59] Report message to a moderator
|
|
|
 |
|
Japanese IME test code
|
 |
|
Re: Japanese IME test code
By: mirek on Sun, 06 April 2008 08:14
|
 |
|
Re: Japanese IME test code
|
 |
|
Re: Japanese IME test code
|
 |
|
Re: Japanese IME test code
By: mirek on Tue, 15 April 2008 21:17
|
 |
|
Re: Japanese IME test code
|
 |
|
Re: Japanese IME test code
By: mirek on Wed, 23 April 2008 10:02
|
 |
|
Re: Japanese IME test code
|
 |
|
Re: Japanese IME test code
By: mirek on Sat, 26 April 2008 10:26
|
 |
|
Re: Japanese IME test code
By: mirek on Sat, 26 April 2008 10:27
|
 |
|
Re: Japanese IME test code
|
 |
|
Re: Japanese IME test code
By: mirek on Sat, 26 April 2008 15:00
|
 |
|
Re: Japanese IME test code
|
 |
|
Re: Japanese IME test code
|
 |
|
Re: Japanese IME test code
By: mirek on Tue, 29 April 2008 18:56
|
 |
|
Re: Japanese IME test code
|
 |
|
Re: Japanese IME test code
By: mirek on Tue, 06 May 2008 19:49
|
 |
|
Re: Japanese IME test code
By: mirek on Tue, 06 May 2008 22:21
|
 |
|
Re: Japanese IME test code
|
 |
|
Re: Japanese IME test code
By: mirek on Thu, 08 May 2008 09:52
|
 |
|
Re: Japanese IME test code
|
 |
|
Re: Japanese IME test code
|
 |
|
Re: Japanese IME test code
By: mirek on Wed, 14 May 2008 09:13
|
 |
|
Re: Japanese IME test code
|
 |
|
Re: Japanese IME test code
|
 |
|
Re: Japanese IME test code
|
 |
|
Re: Japanese IME test code
By: mirek on Fri, 16 May 2008 09:14
|
Goto Forum:
Current Time: Wed May 14 02:43:26 CEST 2025
Total time taken to generate the page: 0.03525 seconds
|