home *** CD-ROM | disk | FTP | other *** search
/ PC Administrator / spravce.iso / TaskModule / src / Mywindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-06-10  |  2.7 KB  |  62 lines

  1. // MyWindow.h: interface for the CMyWindow class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. /*
  5. Copyright 2001 Anish Mistry. All rights reserved.
  6.  
  7. Redistribution and use in source and binary forms, with or without modification,
  8. are permitted provided that the following conditions are met:
  9.  
  10.    1. Redistributions of source code must retain the above copyright notice, 
  11.    this list of conditions and the following disclaimer.
  12.    2. Redistributions in binary form must reproduce the above copyright notice,
  13.    this list of conditions and the following disclaimer in the documentation 
  14.    and/or other materials provided with the distribution.
  15.  
  16. THIS SOFTWARE IS PROVIDED BY ANISH MISTRY ``AS IS'' AND ANY EXPRESS OR IMPLIED 
  17. WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 
  18. AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS 
  19. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
  20. OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  21. GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  22. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
  23. TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  24. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25.  
  26. The views and conclusions contained in the software and documentation are those
  27. of the authors and should not be interpreted as representing official policies,
  28. either expressed or implied, of the Anish Mistry or AM Productions.
  29.  
  30. * Variation of the FreeBSD License. http://www.freebsd.org/copyright/freebsd-license.html
  31. */
  32.  
  33. #if !defined(AFX_MYWINDOW_H__252821AF_DD61_4B6F_BD61_14E479FF8FD0__INCLUDED_)
  34. #define AFX_MYWINDOW_H__252821AF_DD61_4B6F_BD61_14E479FF8FD0__INCLUDED_
  35.  
  36. #if _MSC_VER > 1000
  37. #pragma once
  38. #endif // _MSC_VER > 1000
  39.  
  40. #include "Thunk.h"
  41.  
  42. class CMyWindow  
  43. {
  44. protected:
  45.     virtual LRESULT WndProc(HWND hWnd,UINT nMessage,WPARAM wParam,LPARAM lParam);    // this must be the first declared virtual function
  46.     ThunkData m_Thunk;
  47. public:
  48.     CMyWindow();
  49.     virtual ~CMyWindow();
  50.     virtual HWND GetSafeHwnd();
  51.     virtual ATOM RegisterClass(char *pWindowClass, unsigned long int nIconID, unsigned long int nMenuID);
  52.     virtual unsigned long int Init(HWND hParent,char *pWindowName, unsigned long int dwExStyle,unsigned long int dwStyle, int x, int y,int nWidth, int nHeight, HMENU hMenu, int nCmdShow);
  53. protected:
  54.     virtual unsigned long int OnCommand(WPARAM wParam, LPARAM lParam);
  55.  
  56.     HWND m_hWnd;
  57.     HINSTANCE m_hInstance;
  58.     char m_pWindowClass[MAX_PATH];
  59. };
  60.  
  61. #endif // !defined(AFX_MYWINDOW_H__252821AF_DD61_4B6F_BD61_14E479FF8FD0__INCLUDED_)
  62.