PDA

View Full Version : Qt Twain Scanner



^NyAw^
14th May 2008, 13:37
Hi,

I'm developing a scanner app on windows with the help of "NCTwainClient" lib. This lib has an example using MFC. I want to use this lib on my Qt app and the problem is this code(on MFC):



BOOL CPolyScanMFCView::PreTranslateMessage(MSG* pMsg)
{
//////////////////////////////////////////////
// The exact way to process messages by TWAIN:
//
return (OnTwainMessage(pMsg) || CFormView::PreTranslateMessage(pMsg));
}


When the app recives a MSG*, this function is called and there it is passed to the "NCTwainClient" that would check if is a Twain message. If the message is not a twain message it is processed by the CFormView.
The Twain messages are posted when the scanner finish scanning every image.

Anyone have an idea to how do this on Qt?

Thanks,

jpn
14th May 2008, 14:34
Perhaps QWidget::winEvent(MSG*, long*)...

^NyAw^
14th May 2008, 15:49
Hi,

Will take a look.

Thanks,