[Qt-interest] How to use Windows Message System in Qt/Win Application?

Robert Hairgrove evorgriahr at hispeed.ch
Thu Jun 10 13:01:06 CEST 2010


Matthias Pospiech wrote:
> As said in an earlier post I have a camera library for windows which 
> uses in its examples MFC
> and basic Windows C++ stuff.
> 
> The realise a live video with Messages.
> 
> The message is enabled with this library call:
> bool CIdsSimpleLiveDlg::OpenCamera()
> {
> ...
> is_EnableMessage(m_hCam, IS_FRAME, GetSafeHwnd());
> }
> 
> and handled like this:
> LRESULT CIdsSimpleLiveDlg::OnUEyeMessage( WPARAM wParam, LPARAM lParam )
> {
>  switch ( wParam )
>  {
>  ...
>    case IS_FRAME:
>        if( m_pcImageMemory != NULL )
>            is_RenderBitmap( m_hCam, m_lMemoryId, m_hWndDisplay, 
> m_nRenderMode );
>      break;
>  }    return 0;
> }
> 
> is there a chance to integrate this code also in a Qt application?
> How does Qt work together with the Message system from win32/MFC?
> 
> Matthias

Check out the docs for this:
QCoreApplication::winEventFilter ( MSG * msg, long * result );

and this:
QCoreApplication::setEventFilter ( EventFilter filter );



More information about the Qt-interest-old mailing list