Omnis Webview external focus issue

Kelly Burgess kellyb at
Fri Mar 6 06:40:30 EST 2015

Hi Florian,

Are you responding to WM_FOCUSCHANGED messages?

This message is generated when the input focus has been changed by Omnis. If a window displays an input caret, this is the time when the caret should be created or destroyed.

 focus - Value of wParam. If zero, the window looses the input focus. If 1 the window receives the input focus.

An external component should return non-zero if it creates or destroys the caret; otherwise, it should return zero.

The discussion of that message in the HWND reference shows an example response making calls to WNDcreateCaret, WNDsetCaretPos, WNDshowCaret and WNDdestroyCaret.  So maybe if you did all of that except the WNDshowCaret, it would be enough to remove the caret from the previously focused object.

WNDsetCapture and WNDreleaseCapture are worth investigating.  WNDsetCapture "sets the mouse or key capture to the given window. With the mouse or key capture set, all mouse and key input is directed to that window, regardless of whether the cursor is over that window or the window has the focus. Only one window can have the mouse capture or key capture at any one time."  So maybe calling one of these in response to WM_FOCUSCHANGED would help.


More information about the omnisdev-en mailing list