Splash.cpp
资源名称:网络视频电话系统.rar [点击查看]
上传用户:oldpeter23
上传日期:2013-01-09
资源大小:1111k
文件大小:2k
源码类别:
IP电话/视频会议
开发平台:
Visual C++
- //NetTalk
- /*------------------------------------------------------------------------------*
- =============================
- 模块名称: Splash.cpp
- =============================
- [版权]
- 2000-2002 115软件工厂 版权所有
- *------------------------------------------------------------------------------*/
- #include "WndX.h"
- #include "Splash.h"
- /*------------------------------------------------------------------------------*/
- CSplash::CSplash(UINT nTime)
- {
- m_nTime=nTime;
- }
- /*------------------------------------------------------------------------------*/
- CSplash::~CSplash()
- {
- }
- /*------------------------------------------------------------------------------*/
- LRESULT CSplash::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
- {
- switch(uMsg)
- {
- case WM_INITDIALOG:
- {
- POINT pt[7]={{11,0},{134,0},{155,21},{297,21},{297,148},{0,148},{0,11}};
- HRGN hrgn=CreatePolygonRgn(pt,7,ALTERNATE);
- SetWindowRgn(m_hWnd,hrgn,FALSE);
- SetTimer(m_hWnd,0,m_nTime,0);
- SetWindowPos(m_hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
- }
- break;
- case WM_TIMER:
- {
- DestroyWindow(m_hWnd);
- KillTimer(m_hWnd,wParam);
- }
- break;
- case WM_ERASEBKGND:
- return TRUE;
- case WM_NCDESTROY:
- {
- CWndX::OnNcDestroy();
- delete this;
- }
- break;
- case WM_LBUTTONDOWN:
- {
- DestroyWindow(m_hWnd);
- }
- break;
- default:
- return FALSE;
- }
- return TRUE;
- }
- /*------------------------------------------------------------------------------*/
- BOOL CSplash::CreateSplash(UINT uTemplate)
- {
- BOOL bRet=FALSE;
- if(!CDialogX::Create((LPCTSTR)uTemplate,0))
- goto RET;
- ShowWindow(m_hWnd,SW_SHOW);
- bRet=TRUE;
- RET:
- return bRet;
- }