大家好, 我的一个对话框界面,左上部分有个picture控件的视频窗口,用于播放视频的.
播放视频之后,切换到其他窗口或者最小化程序,再次切换回来之后,想让视频窗口
还是正常播放视频,而不是拖动一下,才可以正常观看视频.查了一下,需要重载ON_WM_ERASEBKGND()消息,BOOL CMediaClientDlg::OnEraseBkgnd(CDC *pDC)
{
CRect rc;
CWnd* pwnd;
pwnd = NULL;
/* IDC_SCREEN 为视频窗口控件ID */
pwnd = GetDlgItem(IDC_SCREEN);
if( pwnd )
pwnd->GetWindowRect(&rc); ScreenToClient(&rc);
// 排斥指定区域被视频窗口覆盖
pDC->ExcludeClipRect(&rc);
return TRUE;
}这段代码在没有加载皮肤的时候,是可以正常运行的,
可是加载了皮肤之后,程序就不会运行到这个函数里面,
用的是skin++的皮肤库,代码类似如下:
BOOL CMediaClientApp::InitInstance()
{
skinppLoadSkin( _T("Skins\\MetalVista20.ssk") );
CMediaClientDlg dlg;
m_pMainWnd = &dlg; // Show the main dialog
dlg.DoModal(); // Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
skinppExitSkin(); return FALSE;
}是不是皮肤库里面把这个消息给拦截了?
怎么解决这个问题啊?
播放视频之后,切换到其他窗口或者最小化程序,再次切换回来之后,想让视频窗口
还是正常播放视频,而不是拖动一下,才可以正常观看视频.查了一下,需要重载ON_WM_ERASEBKGND()消息,BOOL CMediaClientDlg::OnEraseBkgnd(CDC *pDC)
{
CRect rc;
CWnd* pwnd;
pwnd = NULL;
/* IDC_SCREEN 为视频窗口控件ID */
pwnd = GetDlgItem(IDC_SCREEN);
if( pwnd )
pwnd->GetWindowRect(&rc); ScreenToClient(&rc);
// 排斥指定区域被视频窗口覆盖
pDC->ExcludeClipRect(&rc);
return TRUE;
}这段代码在没有加载皮肤的时候,是可以正常运行的,
可是加载了皮肤之后,程序就不会运行到这个函数里面,
用的是skin++的皮肤库,代码类似如下:
BOOL CMediaClientApp::InitInstance()
{
skinppLoadSkin( _T("Skins\\MetalVista20.ssk") );
CMediaClientDlg dlg;
m_pMainWnd = &dlg; // Show the main dialog
dlg.DoModal(); // Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
skinppExitSkin(); return FALSE;
}是不是皮肤库里面把这个消息给拦截了?
怎么解决这个问题啊?
或者有什么皮肤库不会拦截这个等一些系统消息呢?
请知道的朋友赐教!