Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cResDialog Class Reference

#include <cResDialog.h>

Inheritance diagram for GrayLib::cResDialog:
GrayLib::cResDlgBase

Public Member Functions

 cResDialog (const BYTE *pResource=nullptr, CODEPAGE_t uCodePage=CP_ACP)
 
virtual ~cResDialog ()
 
ITERATE_t ReadResourceData (const BYTE *pResource, CODEPAGE_t uCodePage=CP_ACP)
 
void GetFontCfg (cWinFontCfg &fontcfg) const
 
void SetFontClear ()
 
void SetFont (const GChar_t *pszFaceName, WORD wFontSize)
 
cResDlgTemplateItemPtr GetItemID (DLGID_t wId) const
 
cResDlgTemplateItemPtr GetItemEnum (int i) const
 
bool RemoveItemID (DLGID_t wId)
 
void AddItem (cResDlgTemplateItem *pItem)
 
void MoveAll (short x, short y)
 
void Resize (short x, short y)
 
void ConvertToRTL ()
 
 UNITTEST2_PREDEF (cResDialog)
 
- Public Member Functions inherited from GrayLib::cResDlgBase
void SetCopy (const cResDlgBase *pItem)
 
void SetClear ()
 
cPoint2i get_XYPosDLU (void) noexcept
 
short get_WidthDLU () const
 
short get_HeightDLU () const
 
cRectI get_Rect () const
 

Public Attributes

bool m_bExtended
 DLGTEMPLATEEX. More...
 
cResDlgStringOrId m_Menu
 
short m_sFontSize
 
short m_sFontWeight
 Extended only. More...
 
BYTE m_bFontItalic
 Extended only. More...
 
BYTE m_bFontCharset
 Extended only. More...
 
cResDlgStringOrId m_FontFace
 
CODEPAGE_t m_uCodePage
 For (en/de)coding Unicode. More...
 
cArrayRef< cResDlgTemplateItemm_aItems
 
- Public Attributes inherited from GrayLib::cResDlgBase
DLGID_t m_wId
 old format this is a WORD, EX format this is UINT32. More...
 
UINT32 m_dwHelpId
 Extended only RESOURCEID_t. More...
 
cPoint2i m_point
 dialog units = 4x8 units of the current selected font. k_DLU_X More...
 
cWinSize m_size
 in dialog units. k_DLU_X More...
 
UINT32 m_dwExStyle
 
UINT32 m_dwStyle
 
cResDlgStringOrId m_Class
 "BUTTON","LISTBOX" etc. DIALOG or DIALOGEX ? More...
 
cResDlgStringOrId m_Title
 

Additional Inherited Members

- Static Public Attributes inherited from GrayLib::cResDlgBase
static const int k_DLU_X = 4
 ratio of dialog units to pixels. ((float)get_FontWidth()) / k_DLU_X; // 1.5f; // convert dialog units to pixels More...
 
static const int k_DLU_Y = 8
 ratio of dialog units to pixels. ((float)get_FontHeight()) / k_DLU_Y; // 1.7f; // convert dialog units to pixels More...
 

Detailed Description

"DIALOG" or "DIALOGEX" in resource. template data for the dialog. stored EXE attached in resource blob of type RT_DIALOG Dialogs previous to XAML.

Constructor & Destructor Documentation

◆ cResDialog()

GrayLib::cResDialog::cResDialog ( const BYTE *  pResource = nullptr,
CODEPAGE_t  uCodePage = CP_ACP 
)

CDialogTemplate

◆ ~cResDialog()

GrayLib::cResDialog::~cResDialog ( )
virtual

Member Function Documentation

◆ AddItem()

void GrayLib::cResDialog::AddItem ( cResDlgTemplateItem pItem)

Adds a copy of an item to the dialog

◆ ConvertToRTL()

void GrayLib::cResDialog::ConvertToRTL ( )

Moves every item right and gives it the WS_EX_RIGHT extended style

◆ GetFontCfg()

void GrayLib::cResDialog::GetFontCfg ( cWinFontCfg fontcfg) const

◆ GetItemEnum()

cResDlgTemplateItemPtr GrayLib::cResDialog::GetItemEnum ( int  i) const
Returns
info about the item with the indexed i

◆ GetItemID()

cResDlgTemplateItemPtr GrayLib::cResDialog::GetItemID ( DLGID_t  wId) const
Returns
info about the item with the id wId

◆ MoveAll()

void GrayLib::cResDialog::MoveAll ( short  x,
short  y 
)

Moves all of the items in the dialog by (x,y)

◆ ReadResourceData()

ITERATE_t GrayLib::cResDialog::ReadResourceData ( const BYTE *  pResource,
CODEPAGE_t  uCodePage = CP_ACP 
)

Decode the dialog resource blob.

Returns
count of items.

◆ RemoveItemID()

bool GrayLib::cResDialog::RemoveItemID ( DLGID_t  wId)

Removes an item

Returns
1 if removed, 0 otherwise

◆ Resize()

void GrayLib::cResDialog::Resize ( short  x,
short  y 
)

Resizes the dialog by (x,y)

◆ SetFont()

void GrayLib::cResDialog::SetFont ( const GChar_t pszFaceName,
WORD  wFontSize 
)

Sets the font of the dialog

◆ SetFontClear()

void GrayLib::cResDialog::SetFontClear ( )

◆ UNITTEST2_PREDEF()

GrayLib::cResDialog::UNITTEST2_PREDEF ( cResDialog  )

Member Data Documentation

◆ m_aItems

cArrayRef<cResDlgTemplateItem> GrayLib::cResDialog::m_aItems

◆ m_bExtended

bool GrayLib::cResDialog::m_bExtended

DLGTEMPLATEEX.

◆ m_bFontCharset

BYTE GrayLib::cResDialog::m_bFontCharset

Extended only.

◆ m_bFontItalic

BYTE GrayLib::cResDialog::m_bFontItalic

Extended only.

◆ m_FontFace

cResDlgStringOrId GrayLib::cResDialog::m_FontFace

◆ m_Menu

cResDlgStringOrId GrayLib::cResDialog::m_Menu

◆ m_sFontSize

short GrayLib::cResDialog::m_sFontSize

◆ m_sFontWeight

short GrayLib::cResDialog::m_sFontWeight

Extended only.

◆ m_uCodePage

CODEPAGE_t GrayLib::cResDialog::m_uCodePage

For (en/de)coding Unicode.


The documentation for this class was generated from the following files: