View Full Version : MFC Dialog based application

August 21, 2003, 03:46:51

I would like to build an dialog based application using the ICImaging software. Given that I am new to the MFC environment, I was wondering if you would have a sample (like the First Steps project) for me to study. Specifically, I am trying to display a live image in a window within the dialog. Which object should I insert?

Any help would be appreciated. Thanks in advance!

Stefan Geissler
August 27, 2003, 10:38:02

if you want to display the live video in an child window of your dialog, you should insert a CStatic in the resource editor to your form. With the class wizzard create a new member variable of the new CStatic and name e.g. "m_cVideoWindow".
In the OnInitDialog() you can assign the handle of your m_cVideoWindow to the Grabber and resize the live video to the size of the m_cVideoWindow:

CRect cRect;
m_cVideoWindow.GetClientRect( &cRect);
m_Grabber.setHWND( m_cVideoWindow.m_hWnd);
m_Grabber.setWindowSize(cRect.Width(), cRect.Height());