Results 1 to 2 of 2

Thread: How to pass window handle to third party API and process window messages.

  1. #1
    Join Date
    Apr 2012
    Location
    Delhi, India
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default 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.

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default 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.

Similar Threads

  1. Pass data from window to window
    By kais khelifa in forum Newbie
    Replies: 1
    Last Post: 27th November 2011, 20:59
  2. Replies: 6
    Last Post: 9th November 2011, 04:31
  3. Presenting error messages in one window.
    By AndresBarbaRoja in forum Newbie
    Replies: 3
    Last Post: 17th June 2011, 17:01
  4. QWidget::winId() can not get the right window handle
    By ponponfish in forum Qt Programming
    Replies: 2
    Last Post: 17th May 2011, 06:45
  5. Getting the handle of the window
    By Luc4 in forum Qt Programming
    Replies: 13
    Last Post: 16th May 2010, 12:02

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.