home *** CD-ROM | disk | FTP | other *** search
/ PC Administrator / spravce.iso / TaskModule / src / SnapWnd.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-09-13  |  2.4 KB  |  60 lines

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