There seems to be a difference in functionality of CreateCaret between Windows (XP at least) and Wine. You can find a test program at:
http://foltman.com/wintest-caret.zip
Look at this code snippet:
CreateCaret(hWnd, NULL, 0, 20); SetCaretPos(100,100); CreateCaret(hWnd, NULL, 10, 10);
In Wine, the 2nd CreateCaret resets caret position to (0, 0). In Windows, caret position doesn't get reset - it's still positioned at (100, 100).
Note that calling CreateCaret twice without DestroyCaret is not a bug (after MSDN):
- - - - - cut - - - - - CreateCaret automatically destroys the previous caret shape, if any, regardless of the window that owns the caret. The caret is hidden until the application calls the ShowCaret function to make the caret visible. - - - - - cut - - - - -
Is it easy to fix for anyone ?
Krzysztof