bool JumpToLine(HWND hwnd, int nLineNo)
{
// 指定行にジャンプ
long nCharIndex = SendMessage(hwnd, EM_LINEINDEX, nLineNo - 1, 0);
TRACE("nCharIndex = %d\n", nCharIndex);
PostMessage(hwnd, EM_SETSEL, nCharIndex, nCharIndex);
PostMessage(hwnd, EM_SCROLLCARET, 0, 0);
return true;
}
|
