- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
SplashWindow.cpp
资源名称:44757463.rar [点击查看]
上传用户:lj3531212
上传日期:2007-06-18
资源大小:346k
文件大小:1k
源码类别:
绘图程序
开发平台:
Visual C++
- /* Hello, If you have any Question?
- Welcome E-mail me, My e-mail is r39710@giga.net.tw
- Thank you Bye
- */
- #include<stdafx.h>
- #include<mmsystem.h>
- #include"SplashWindow.h"
- #include"resource.h"
- BEGIN_MESSAGE_MAP(CSplashWindow, CWnd)
- ON_WM_PAINT()
- END_MESSAGE_MAP()
- CSplashWindow::CSplashWindow()
- {
- m_Bitmap.LoadBitmap(MAKEINTRESOURCE(IDB_SPLASH2)); //Load Bitmap
- m_Bitmap.GetBitmap(&bmBitmap); //Get Bitmap Info
- /*Show Splash Window and Play SplashWindow.wav*/
- // ::PlaySound("SplashWindow.wav", NULL, SND_ASYNC | SND_FILENAME);
- }
- CSplashWindow::~CSplashWindow()
- {
- }
- void CSplashWindow::CreateSplash()
- {
- //Create Splash Window
- CreateEx(0,
- AfxRegisterWndClass(
- 0,
- AfxGetApp()->LoadStandardCursor(IDC_UPARROW)),
- "SplashWindow Sample",
- WS_POPUP,
- 0,
- 0,
- bmBitmap.bmWidth, //Bitmap Width = Splash Window Width
- bmBitmap.bmHeight, //Bitmap Height = Splash Window Height
- NULL,
- NULL,
- NULL);
- }
- void CSplashWindow::OnPaint()
- {
- CPaintDC dc(this);
- MemDC.CreateCompatibleDC(NULL); //Create Memory DC
- Old_Bitmap = MemDC.SelectObject(&m_Bitmap); //Select DC
- dc.StretchBlt(0,
- 0,
- bmBitmap.bmWidth,
- bmBitmap.bmHeight,
- &MemDC,
- 0,
- 0,
- bmBitmap.bmWidth,
- bmBitmap.bmHeight,
- SRCCOPY);
- MemDC.SelectObject(Old_Bitmap); //Select Bitmap
- }