Demodlg.cpp and demodlg.h changes – Sensoray 2253 Windows User Manual
Page 55

{
}
CVidWindow::~CVidWindow()
{
}
BEGIN_MESSAGE_MAP(CVidWindow, CWnd)
ON_WM_PAINT()
ON_WM_ERASEBKGND()
END_MESSAGE_MAP()
// CVidWindow message handlers
void CVidWindow::OnPaint()
{
{
CPaintDC dc(this);
CWnd::OnPaint();
// repaint the video
S2253_RepaintWindow(dc.GetSafeHdc(), 0, 0);
}
}
BOOL CVidWindow::OnEraseBkgnd(CDC *pDC)
{
// return NON-ZERO, do not erase this window or video may flicker
return TRUE;
}
DemoDlg.cpp and DemoDlg.h changes
Include the header file “vidwindow.h”. In the OnInitDialog() function, add
the function below to create the window. “rect” is the defined window
rectangle to create.
m_vidWin.Create(_T(
"STATIC"
), NULL, WS_VISIBLE | WS_CHILD |
WS_CLIPSIBLINGS | WS_CLIPCHILDREN, rect,
this
, 9992);
55
This manual is related to the following products: