home *** CD-ROM | disk | FTP | other *** search
- //////////////////////////////////////////////////////////////////////////////
- // NAME.......: OwnComboBox.h
- // PURPOSE....: Ownerdrawn combo (bmp and text) box for displaying
- // appointment types and assoc. bmps (page 3)
- // WRITTEN....: 96/09/27 by Darko Juvan
- // DESCRIPTION: owner drawn combo box
- //
- // This code and information is provided "as is" without warranty of any
- // kind, either expressed or implied, including but not limited to the
- // implied warranties of merchantability and/or fitness for a particular
- // purpose..
- //
- // Copyright (c) 1998 Multiactive Software Inc. All Rights Reserved.
- //
- //////////////////////////////////////////////////////////////////////////////
-
-
- class CBmpComboData
- {
- public:
- CBmpComboData (const char* pszText, UINT nBitmapID)
- : m_sText (pszText), m_nBitmapID (nBitmapID)
- { }
-
- CSize GetSize();
- void DrawItem (CDC* pDC, const CRect& rc, BOOL bSelected);
- void Focus (CDC* pDC, const CRect& rc, BOOL bAddFocus);
-
- protected:
- CString m_sText;
- UINT m_nBitmapID;
-
- CBitmap m_bmp;
- CSize m_size;
-
- void LoadBitmap();
- };
-
- /////////////////////////////////////////////////////////////////////////////
- // CBmpCombo window
-
- class CBmpCombo : public CComboBox
- {
- // Construction
- public:
- CBmpCombo();
-
- // Operations
- public:
- int AddItem (const char* pszText, UINT nBitmapID);
-
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CBmpCombo)
- public:
- virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
- virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
- virtual void DeleteItem(LPDELETEITEMSTRUCT lpDeleteItemStruct);
- //}}AFX_VIRTUAL
-
- // Implementation
- public:
- virtual ~CBmpCombo();
-
- // Generated message map functions
- protected:
- //{{AFX_MSG(CBmpCombo)
- // NOTE - the ClassWizard will add and remove member functions here.
- //}}AFX_MSG
-
- DECLARE_MESSAGE_MAP()
- };
-
- /////////////////////////////////////////////////////////////////////////////
-