Đã Đóng

Win32 API Track Text Cursor

This project requires delivering working source code using the Win32 API directly in C/C++. MFC or another framework / class library is not an option. Your code must be able to provide the screen location of the caret (text cursor) to a window by sending it a window message whenever the caret is made visible, the focus changes or the caret moves in *any* Windows application in Windows 98/ME/2000/XP/2003.

The system *should not* loop around checking for the position of the caret, but if this is *absolutely* necessary then I'll have to live with it.

Note that this is not as easy as it sounds - you can use the GetCaretPos, GetFocus and ClientToScreen API functions after attaching to the input thread of that process (there are samples if you google), but this will not work for tracking the caret in eg. Mozilla's address bar.

The only other requirement is that the code must be fast (the results of it will be being used in a loop), so no waiting around for 10ms for any reason. That bit probably only applies if you are using the polling option, which I've already expressed preference against.

As a hint, you probably want to use a Windows hook to do this. The Windows Magnifier in XP (under AccessoriesAccessibility) has the correct functionality for tracking the text cursor, so if you can work out how they did it, then you are welcome to just provide that code.

Just to emphasise again - this is only native Windows API C/C++ with *no* external dependencies - no libraries, no DLLs, no class libraries and no frameworks. Obviously this is only a small part of a program, so I don't expect the quotes to get too high, although there *may* be other parts of the project that I might be interested in subcontracting at a later stage.

Kĩ năng: Lập trình C, Màn hình Windows

Xem nhiều hơn: win32 api cursor, windows api text cursor, windows api track cursor, win32 api text cursor, win32 tracking caret, caret tracking win32, tracking text cursor, track quotes, text easy, library part, directly, text caret win32, windows api cursor text position, win32 api caret, win32api cursor messaging, win32api cursor, application frameworks, windows api, windows 98, win32

Về Bên Thuê:
( 0 nhận xét ) Manchester, United Kingdom

ID dự án: #17113