Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CtrlSchemaCombo.h

Go to the documentation of this file.
00001 //
00002 // CtrlSchemaCombo.h
00003 //
00004 // Copyright (c) Shareaza Development Team, 2002-2005.
00005 // This file is part of SHAREAZA (www.shareaza.com)
00006 //
00007 // Shareaza is free software; you can redistribute it
00008 // and/or modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2 of
00010 // the License, or (at your option) any later version.
00011 //
00012 // Shareaza is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with Shareaza; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 //
00021 
00022 #pragma once
00023 
00024 class CSchema;
00025 
00026 
00027 class CSchemaCombo : public CComboBox
00028 {
00029 // Construction
00030 public:
00031         CSchemaCombo();
00032         virtual ~CSchemaCombo();
00033 
00034 // Attributes
00035 public:
00036         CString         m_sNoSchemaText;
00037         int                     m_nType;
00038         int                     m_nAvailability;
00039 protected:
00040         HWND            m_hListBox;
00041         WNDPROC         m_pWndProc;
00042         CString         m_sPreDrop;
00043 
00044 // Operations
00045 public:
00046         void            SetEmptyString(UINT nID);
00047         void            Load(LPCTSTR pszSelectURI = NULL, int nType = 0, int nAvailability = 0, BOOL bReset = TRUE);
00048         void            Select(LPCTSTR pszURI);
00049         void            Select(CSchema* pSchema);
00050         CSchema*        GetSelected() const;
00051         CString         GetSelectedURI() const;
00052 protected:
00053         static LRESULT PASCAL ListWndProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam);
00054         int                     FindParam(DWORD nParam);
00055         BOOL            OnClickItem(int nItem, BOOL bDown);
00056 
00057 // Overrides
00058 public:
00059         virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
00060         virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00061         virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
00062 
00063 // Implementation
00064 protected:
00065         DECLARE_MESSAGE_MAP()
00066         afx_msg LRESULT OnCtlColorListBox(WPARAM wParam, LPARAM lParam);
00067         afx_msg void OnDropDown();
00068 };

Generated on Thu Dec 15 10:39:37 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2