|
/********************************************************************
Created: 27/3/2004, 14:36
File name: D:\Projects\Exile\Exile\GroupedControls.h
File path: D:\Projects\Exile\Exile
File base: GroupedControls
File ext: h
Author: Gogolev Anton
*********************************************************************/
// GroupedControls.h: interface for the CGroupedControls class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_GROUPEDCONTROLS_H__3FA5E115_6967_4552_865F_E0FAF86C41B3__INCLUDED_)
#define AFX_GROUPEDCONTROLS_H__3FA5E115_6967_4552_865F_E0FAF86C41B3__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <vector>
typedef struct tagGROUPEDCONTROLITEM {
HWND hWnd; // Control window handle
int nGroupID; // Group ID
} GROUPEDCONTROLITEM;
typedef std::vector<GROUPEDCONTROLITEM> VGROUPEDCONTROL;
class CGroupedControls
{
public:
CGroupedControls();
virtual ~CGroupedControls();
// All states possible
enum SWITCH_STATES { SWS_ENABLE, SWS_DISABLE, SWS_SHOW, SWS_HIDE };
// Switches controls in group nGroupID according to nState and switches all other
// controls according to nOuterState, which is applied first.
void SwitchControls(const int nGroupID, const SWITCH_STATES nState, const SWITCH_STATES nOuterState) const;
void SwitchControls(const int nGroupID, const SWITCH_STATES nState) const;
void EnableControls(const int nGroupID) const;
void DisableControls(const int nGroupID) const;
void HideControls(const int nGroupID) const;
void ShowControls(const int nGroupID) const;
void RemoveControl(const HWND hControl);
void AddControl(const int nGroupID, const HWND hControl);
private:
VGROUPEDCONTROL m_vControls;
};
#endif // !defined(AFX_GROUPEDCONTROLS_H__3FA5E115_6967_4552_865F_E0FAF86C41B3__INCLUDED_)
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here