SetWindowsHookEx (WH_CALLWNDPROC, MyHookProc, hModule, 0);
WM_IME_NOTIFY listen the news
The static LONG IMENotifyHandle (HWND HWND, UINT MSG, WPARAM WPARAM, LPARAM LPARAM)
{
Static int x=INVALID_VALUE;
Static int y=INVALID_VALUE;
Static int font_height=INVALID_VALUE;
The FILE * fp.
Fp=fopen (" D: \ \ log. TXT ", "a +");
The SetLastError (0);
/*
These two effects like???
Browser book here is one of the empty error 1413
VS notepad + + can get get
*/
//for current is input window handle to the input method of
HIMC HIMC=(HIMC) (LONG_PTR) GetWindowLongPtr (hWnd, IMMGWLP_IMC);
//HIMC HIMC=ImmGetContext (hWnd);
if (! HIMC)
{
Sprintf (STR, "!" HIMC % d \ n ", GetLastError ());
Fwrite (STR, strlen (STR), 1, fp);
}
LPINPUTCONTEXT lpIMC;
//IMC structure is obtained by a handle (input method context)
if (! (lpIMC=ImmLockIMC (hIMC)))
{
Sprintf (STR, "ImmLockIMC faild % d \ n", GetLastError ());
Fwrite (STR, strlen (STR), 1, fp);
The fclose (fp);
return 0L;
}
The switch (wParam) {
Case IMN_SETCOMPOSITIONWINDOW:
Sprintf (STR, "IMN_SETCOMPOSITIONWINDOW:");
Fwrite (STR, strlen (STR), 1, fp);
POINT pt;
Pt=lpIMC - & gt; CfCompForm. PtCurrentPos;
The ClientToScreen (lpIMC - & gt; The hWnd, & amp; Pt);
Sprintf (STR, "x: y % d: % d \ n", pt. X, pt. Y);
Fwrite (STR, strlen (STR), 1, fp);
//as can be used to calculate a string of wide high
/* HDC HDC.
HDC=GetDC (lpIMC - & gt; HWnd);
GetTextExtentPoint (hDC, "A", 1, & amp; SzOffset);
The ReleaseDC (lpIMC - & gt; The hWnd, hDC); */
//g_ptTopLeft. X=ptSrc. X + szOffset. Cx.
//g_ptTopLeft. Y=ptSrc. Y + szOffset. Cy.
break;
Case IMN_SETCANDIDATEPOS:
Sprintf (STR, "IMN_SETCANDIDATEPOS: 1111 \ n");
Fwrite (STR, strlen (STR), 1, fp);
break;
Default:
break;
}
ImmUnlockIMC (hIMC);
The fclose (fp);
return 0;
}
/* */comment where urgent help!!!!!!