How to pass window handle to third party API and process window messages.
Hi,
I am programming with third party C++ api which takes a window handle and
reproduce window messages. When I pass my QWidget window handle
and trace event through winEvent it filtering all events of mouse and keybords
also.
I want only those window messages which are produced by that API.
I have Sample code in VC++ Like:
enum { WMUS_FP_NOTIFY = WM_USER+1 };
BEGIN_MSG_MAP(XXXXX)
MESSAGE_HANDLER(WMUS_FP_NOTIFY, OnFpNotify)
END_MSG_MAP()
LRESULT OnFpNotify (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
_com_test_error(DPFPCreateAcquisition(ePriority, GUID_NULL,
DP_SAMPLE_TYPE_IMAGE, m_hWnd, WMUS_FP_NOTIFY,
&m_hOperationEnroll)
);
Can you please help me out?
Thanks in advance.
Re: How to pass window handle to third party API and process window messages.
Take a look here.
Basically in your winEvent() just compare MSG.message value to WMUS_FP_NOTIFY and handle only those messages.
Take a look here if you don't know what to do with messages you don't want to handle.