16,473
社区成员
发帖
与我相关
我的任务
分享
BOOL CLovetoYou::Create()
{
if (NULL == lpClassName)
{
lpClassName = AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW,
::LoadCursor(AfxGetResourceHandle(),MAKEINTRESOURCE(IDC_NOCURSOR)));
}
CRect rect(0,0,::GetSystemMetrics(SM_CXSCREEN),::GetSystemMetrics(SM_CYSCREEN));
//创建独占全频窗口
CreateEx(WS_EX_TOPMOST,lpClassName,_T(""),WS_VISIBLE | WS_POPUP,
rect.left,rect.top,rect.right-rect.left,rect.bottom-rect.top,
GetSafeHwnd(),NULL,NULL);
//播放视频
if(!PlayAVI())
{
exit(0);
return FALSE;
}
while (m_DvePlay.IsPlaying())
{
//视屏播放完毕
}
m_DvePlay.Stop();
m_DvePlay.Close();
//显示文字
ShowLove();
return TRUE;
}
BOOL CLovetoYou::ShowLove()
{
CDC *pDC = GetDC();
// CreateThread(NULL,0,PlayThread,(LPVOID)&pDC,0,NULL);
pDC->SetTextColor(RGB(255,0,0));
pDC->TextOut(50,50,"love");
ReleaseDC(pDC);
return TRUE;
}