home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Freeware / Utilitare / VisualBoyAdvance-1.7.2 / src / win32 / skinButton.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-05-13  |  2.8 KB  |  94 lines

  1. // -*- C++ -*-
  2. // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
  3. // Copyright (C) 1999-2003 Forgotten
  4. // Copyright (C) 2004 Forgotten and the VBA development team
  5.  
  6. // This program is free software; you can redistribute it and/or modify
  7. // it under the terms of the GNU General Public License as published by
  8. // the Free Software Foundation; either version 2, or(at your option)
  9. // any later version.
  10. //
  11. // This program is distributed in the hope that it will be useful,
  12. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. // GNU General Public License for more details.
  15. //
  16. // You should have received a copy of the GNU General Public License
  17. // along with this program; if not, write to the Free Software Foundation,
  18. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19.  
  20. #if !defined(AFX_SKINBUTTON_H__E51B4507_EAD7_43EE_9F54_204BC485D59C__INCLUDED_)
  21. #define AFX_SKINBUTTON_H__E51B4507_EAD7_43EE_9F54_204BC485D59C__INCLUDED_
  22.  
  23. #if _MSC_VER > 1000
  24. #pragma once
  25. #endif // _MSC_VER > 1000
  26. // skinButton.h : header file
  27. //
  28.  
  29. /////////////////////////////////////////////////////////////////////////////
  30. // SkinButton window
  31.  
  32. class SkinButton : public CWnd
  33. {
  34.   // Construction
  35.  public:
  36.   SkinButton();
  37.  
  38.   // Attributes
  39.  private:
  40.   HBITMAP normalBmp;
  41.   HBITMAP downBmp;
  42.   HBITMAP overBmp;
  43.   RECT rect;
  44.   bool mouseOver;
  45.   CString id;
  46.   HRGN region;
  47.   WORD idCommand;
  48.   int buttonMask;
  49.   int menu;
  50.  
  51.   // Operations
  52.  public:
  53.   BOOL CreateButton(const char *, DWORD, const RECT&, CWnd *, UINT);
  54.  
  55.   void SetNormalBitmap(HBITMAP);
  56.   void SetDownBitmap(HBITMAP);
  57.   void SetOverBitmap(HBITMAP);
  58.   void SetRect(const RECT &);
  59.   void GetRect(RECT& r);
  60.   void SetId(const char *);
  61.   void SetRegion(HRGN);
  62.  
  63.   // Overrides
  64.   // ClassWizard generated virtual function overrides
  65.   //{{AFX_VIRTUAL(SkinButton)
  66.   //}}AFX_VIRTUAL
  67.  
  68.   // Implementation
  69.  public:
  70.   afx_msg LRESULT OnMouseLeaveMsg(WPARAM wParam, LPARAM lParam);
  71.   afx_msg LRESULT OnMouseMoveMsg(WPARAM wParam, LPARAM lParam);
  72.   afx_msg LRESULT OnLButtonDownMsg(WPARAM wParam, LPARAM lParam);
  73.   afx_msg LRESULT OnLButtonUpMsg(WPARAM wParam, LPARAM lParam);
  74.   virtual ~SkinButton();
  75.  
  76.   // Generated message map functions
  77.  protected:
  78.   //{{AFX_MSG(SkinButton)
  79.   afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  80.   afx_msg void OnPaint();
  81.   afx_msg void OnKillFocus(CWnd* pNewWnd);
  82.   afx_msg void OnCaptureChanged(CWnd *pWnd);
  83.   afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  84.   //}}AFX_MSG
  85.   DECLARE_MESSAGE_MAP()
  86.     };
  87.  
  88.     /////////////////////////////////////////////////////////////////////////////
  89.  
  90. //{{AFX_INSERT_LOCATION}}
  91. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  92.  
  93. #endif // !defined(AFX_SKINBUTTON_H__E51B4507_EAD7_43EE_9F54_204BC485D59C__INCLUDED_)
  94.