// Win32++ Version 7.2
// Released: 5th AUgust 2011
//
// David Nash
// email: dnash@bigpond.net.au
// url: https://sourceforge.net/projects/win32-framework
//
//
// Copyright (c) 2005-2011 David Nash
//
// Permission is hereby granted, free of charge, to
// any person obtaining a copy of this software and
// associated documentation files (the "Software"),
// to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify,
// merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom
// the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice
// shall be included in all copies or substantial portions
// of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
// OR OTHER DEALINGS IN THE SOFTWARE.
//
////////////////////////////////////////////////////////
////////////////////////////////////////////////////////
// controls.h
// Declaration of the following classes:
// CAnimation, CComboBox, CComboBoxEx, CProgressBar,
// CScrollBar, CSlider, CSpinButton
#ifndef _WIN32XX_CONTROLS_H_
#define _WIN32XX_CONTROLS_H_
#include "wincore.h"
namespace Win32xx
{
class CAnimation : public CWnd
{
public:
CAnimation() {}
virtual ~CAnimation() {}
BOOL Close() const;
BOOL Open(LPTSTR lpszName) const;
BOOL Play(UINT wFrom, UINT wTo, UINT cRepeat) const;
BOOL Seek(UINT wFrame) const;
BOOL Stop() const;
protected:
// Overridables
virtual void PreRegisterClass(WNDCLASS &wc) { wc.lpszClassName = ANIMATE_CLASS; }
};
class CComboBox : public CWnd
{
public:
CComboBox() {}
virtual ~CComboBox() {}
int AddString(LPCTSTR lpszString) const;
void Clear() const;
void Copy() const;
void Cut() const;
int DeleteString(int nIndex) const;
int Dir(UINT attr, LPCTSTR lpszWildCard ) const;
int FindString(int nIndexStart, LPCTSTR lpszString) const;
int FindStringExact(int nIndexStart, LPCTSTR lpszString) const;
int GetCount() const;
int GetCurSel() const;
CRect GetDroppedControlRect() const;
BOOL GetDroppedState() const;
int GetDroppedWidth() const;
DWORD GetEditSel() const;
BOOL GetExtendedUI() const;
int GetHorizontalExtent() const;
DWORD GetItemData(int nIndex) const;
int GetItemHeight(int nIndex) const;
int GetLBText(int nIndex, LPTSTR lpszText) const;
int GetLBTextLen(int nIndex) const;
LCID GetLocale() const;
int GetTopIndex() const;
int InitStorage(int nItems, int nBytes) const;
int InsertString(int nIndex, LPCTSTR lpszString) const;
void LimitText(int nMaxChars) const;
void Paste() const;
void ResetContent() const;
int SelectString(int nStartAfter, LPCTSTR lpszString) const;
int SetCurSel(int nIndex) const;
int SetDroppedWidth(int nWidth) const;
BOOL SetEditSel(int nStartChar, int nEndChar) const;
int SetExtendedUI(BOOL bExtended = TRUE) const;
void SetHorizontalExtent(UINT nExtent ) const;
int SetItemData(int nIndex, DWORD dwItemData) const;
int SetItemHeight(int nIndex, UINT cyItemHeight) const;
LCID SetLocale( LCID NewLocale ) const;
int SetTopIndex(int nIndex) const;
void ShowDropDown(BOOL bShow = TRUE) const;
protected:
// Overridables
virtual void PreRegisterClass(WNDCLASS &wc) { wc.lpszClassName = _T("ComboBox"); }
};
class CComboBoxEx : public