[TSF-IME] Page size

Oliver Sradnick 21 Reputation points
2020-09-05T20:16:50.627+00:00

Hi,
i got a question about Text Service Framework, the pages /pagesize and selection index.

Do i understand it right that based the the selected candidate the page is set ?
Is there a way to get all candidates of the currentpage and/or set a different size of a page ?
Or simply disabling the pageing so i retrieve just all candidates and handle the stuff myself ?

Also is there a limit of retriving candidates ?
With https://learn.microsoft.com/en-us/windows/win32/api/msctf/nf-msctf-itfcandidatelistuielement-getcount i get a count if over 1000
but iterating over https://learn.microsoft.com/en-us/windows/win32/api/msctf/nf-msctf-itfcandidatelistuielement-getstring
retrieves always just 100

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,647 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,753 questions
{count} votes

Accepted answer
  1. Rita Han - MSFT 2,166 Reputation points
    2020-09-07T08:23:17.287+00:00

    Hello,

    Is there a way to get all candidates of the currentpage and/or set a different size of a page ?

    ITfDocumentMgr interface seems what you are looking for. Through it you can get ITfContextView interface which implements ITfContextView::GetWnd function. Through the window handle you can do what you want to do.

    Or simply disabling the pageing so i retrieve just all candidates and handle the stuff myself ?

    Refer to TextInputCtrl.cpp for how to manage the window by yourself.

    Also is there a limit of retriving candidates ?

    The behavior of candidate list UI can be controlled by the application like this: limit the candidate list count to MAX_CAND_STR 50. So for getting all candidates you can try ITfCandidateList::GetCandidateNum.

    Thank you!

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.