Home » Source Code » 用户界面线程 » Splasher.h

Splasher.h ( File view )

  • By plstudio1@eyou.com 2013-09-27
  • View(s):93
  • Download(s):0
  • Point(s): 1
			/*
Module : SPLASHER.H
Purpose: A splash screen component for MFC 4.x which uses a DIB bitmap
         instead of a resource. Palette management code is also included
         so that the bitmap will display using its own optimized palette
Created: PJN / 15-11-1996
History: None

Copyright (c) 1996 by PJ Naughter.  
All rights reserved.

*/


#ifndef __SPLASHER_H__
#define __SPLASHER_H__


///////////////// Classes //////////////////////////
class CSplashWnd : public CWnd
{

public:
  CSplashWnd();
  ~CSplashWnd();

// Operations
  void SetBitmapToUse(const CString& sFilename);
  void SetBitmapToUse(UINT nResourceID);
  void SetBitmapToUse(LPCTSTR pszResourceName); 
  BOOL Create();
  void SetOKToClose() {
 m_bOKToClose = TRUE; 
};  
  
protected:
  //{
{
AFX_VIRTUAL(CSplashWnd)
  //
}
}AFX_VIRTUAL

  //{
{
AFX_MSG(CSplashWnd)
  afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  afx_msg void OnPaint();
  afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
  afx_msg BOOL OnQueryNewPalette();
  afx_msg void OnClose();
  //
}
}AFX_MSG

  DECLARE_MESSAGE_MAP()
  
  BOOL SelRelPal(BOOL bForceBkgnd);
  BOOL LoadBitmap();

  BOOL      m_bOKToClose;
  //HBITMAP   m_hBitmap;
  //HPALETTE  m_hPalette;
  CBitmap   m_Bitmap;
  CPalette  m_Palette;
  int       m_nHeight;
  int       m_nWidth;
  CWnd      m_wndOwner;                   
  BOOL      m_bUseFile;
  LPCTSTR   m_pszResourceName;
  CString   m_sFilename;

};


class CSplashThread : public CWinThread
{

public:
  void HideSplash();
  void SetBitmapToUse(const CString& sFilename);
  void SetBitmapToUse(UINT nResourceID);
  void SetBitmapToUse(LPCTSTR pszResourceName); 

protected:
	CSplashThread();
  virtual ~CSplashThread();

	DECLARE_DYNCREATE(CSplashThread)

	//{
{
AFX_VIRTUAL(CSplashThread)
	virtual BOOL InitInstance();
	//
}
}AFX_VIRTUAL

	//{
{
AFX_MSG(CSplashThread)
	//
}
}AFX_MSG

	DECLARE_MESSAGE_MAP()

  CSplashWnd m_SplashScreen;

};


#endif //__SPLASHER_H__


			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 1

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
MainFrm.cpp2.46 kB18-07-07 15:49
MainFrm.h1.54 kB18-07-07 15:49
ReadMe.txt4.44 kB18-07-07 15:49
Clouds.bmp301.05 kB18-07-07 17:30
TEST.BMP162.03 kB18-07-07 17:00
Thumbs.db24.00 kB18-07-07 17:30
Toolbar.bmp1.05 kB18-07-07 15:49
tsinghua.bmp87.94 kB18-07-07 15:56
UIThreadSplasher.ico1.05 kB18-07-07 15:49
UIThreadSplasher.rc2408.00 B18-07-07 15:49
UIThreadSplasherDoc.ico1.05 kB18-07-07 15:49
行星.bmp427.83 kB18-07-07 17:00
resource.h693.00 B18-07-07 17:30
Splasher.cpp8.01 kB22-12-98 22:27
Splasher.h2.03 kB22-12-98 22:24
StdAfx.cpp218.00 B18-07-07 15:49
StdAfx.h1.03 kB18-07-07 16:07
UIThreadSplasher.aps332.64 kB18-07-07 17:32
UIThreadSplasher.clw3.46 kB18-07-07 17:37
UIThreadSplasher.cpp4.92 kB18-07-07 17:37
UIThreadSplasher.dsp5.29 kB18-07-07 17:37
UIThreadSplasher.dsw555.00 B18-07-07 15:49
UIThreadSplasher.h1.43 kB18-07-07 16:45
UIThreadSplasher.ncb97.00 kB18-07-07 17:37
UIThreadSplasher.opt53.50 kB18-07-07 17:37
UIThreadSplasher.plg266.00 B18-07-07 17:37
UIThreadSplasher.rc12.65 kB18-07-07 17:30
UIThreadSplasherDoc.cpp1.90 kB18-07-07 15:49
UIThreadSplasherDoc.h1.55 kB18-07-07 15:49
UIThreadSplasherView.cpp2.81 kB18-07-07 15:49
UIThreadSplasherView.h2.00 kB18-07-07 15:49
<res>0.00 B11-05-13 15:48
<UIThreadSplasher>0.00 B11-05-13 15:48
...
Sponsored links

Splasher.h (486.34 kB)

Need 1 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D