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

#include <cWinApp.h>

Inheritance diagram for GrayLib::CWinApp:
Gray::cAppImpl GrayLib::cWinResMod GrayLib::cAppConfigX GrayLib::cWinMessagePump Gray::cSingletonStatic< cAppImpl >

Public Member Functions

 CWinApp (const FILECHAR_t *pszAppName=nullptr)
 
virtual ~CWinApp ()
 
virtual bool isValidCheck () const noexcept
 
virtual BOOL InitInstance () override
 
virtual bool OnTickApp () override
 
APP_EXITCODE_t Main (HINSTANCE hInstance, SHOWWINDOW_t nCmdShow)
 
- Public Member Functions inherited from Gray::cAppImpl
 cAppImpl (const FILECHAR_t *pszAppName=nullptr)
 
virtual ~cAppImpl ()
 
virtual cString get_HelpText () const
 
virtual bool ShowHelp ()
 
virtual bool CheckHelpArgs ()
 
virtual int Run ()
 
virtual int ExitInstance ()
 
APP_EXITCODE_t Main (HMODULE hInstance=((HMODULE) nullptr))
 
- Public Member Functions inherited from GrayLib::cWinResMod
 cWinResMod (HMODULE hModule) noexcept
 
cString LoadStrID (RESOURCEID_t idString) noexcept
 
- Public Member Functions inherited from GrayLib::cAppConfigX
 cAppConfigX (cStringF sProfileName, cStringF sRegistryKey="")
 
 ~cAppConfigX ()
 
HRESULT GetOpenIni (bool bCreate=true)
 
HRESULT FlushX ()
 
HRESULT EnumConfig (const IniChar_t *pszSection, OUT cArrayString< IniChar_t > &rArray)
 
cString GetConfigStr (const IniChar_t *pszSection, const IniChar_t *pszEntry, const GChar_t *pszDefault=nullptr)
 
UINT GetConfigUInt (const IniChar_t *pszSection, const IniChar_t *pszEntry, int iDefault=0)
 
bool GetConfigVar (const IniChar_t *pszSection, const IniChar_t *pszEntry, OUT cVariant &rvVal)
 
bool WriteConfigStr (const IniChar_t *pszSection, const IniChar_t *pszEntry, const GChar_t *pszVal)
 
bool WriteConfigInt (const IniChar_t *pszSection, const IniChar_t *pszEntry, int iVal)
 
bool WriteConfigVar (const IniChar_t *pszSection, const IniChar_t *pszEntry, const cVariant &vVal)
 
- Public Member Functions inherited from GrayLib::cWinMessagePump
virtual void ProcessMessage (MSG &msg)
 
HRESULT ProcessMessages (TIMESYSD_t tMax=10)
 

Static Public Member Functions

static bool isSingleCreated ()
 
static CWinAppget_Single ()
 
static CWinAppI ()
 
- Static Public Member Functions inherited from Gray::cAppImpl
static HINSTANCE get_HInstance ()
 
- Static Public Member Functions inherited from Gray::cSingletonStatic< cAppImpl >
static bool isSingleCreated () noexcept
 
static cAppImplget_SingleU () noexcept
 
static cAppImplget_Single ()
 
static TYPE2 *__stdcall get_SingleCast ()
 
static cAppImplI () noexcept
 
- Static Public Member Functions inherited from GrayLib::cWinResMod
static constexpr const GChar_tMakeIntResource (RESOURCEID_t id) noexcept
 
static constexpr bool IsIntResource (const GChar_t *pszText) noexcept
 
static constexpr RESOURCEID_t GetIntResource (const GChar_t *pszText) noexcept
 
- Static Public Member Functions inherited from GrayLib::cWinMessagePump
static cWinMessagePump *GRAYCALL get_MessagePump ()
 

Public Attributes

cStringF m_pszHelpFilePath
 The path to the application's Help file. (if any) (MFC name) More...
 
const FILECHAR_tm_pszProfileName
 the path to the profile specific to this app. (else use m_pszRegistryKey) More...
 
- Public Attributes inherited from Gray::cAppImpl
const FILECHAR_tm_pszAppName
 Specifies the name of my application. (display friendly) More...
 
TIMESYSD_t m_nMinTickTime
 Minimum amount of time to spend in the OnTickApp() (mSec). cThreadId::SleepCurrent() if there is extra time. More...
 
cAppStatem_State
 Quick reference to cAppState singleton. More...
 
bool m_bCloseSignal
 Polite request to close the application. checked in Run() and OnTickApp() More...
 

Additional Inherited Members

- Static Public Attributes inherited from Gray::cAppImpl
static const char * k_HelpText
 
- Protected Member Functions inherited from Gray::cSingletonStatic< cAppImpl >
 cSingletonStatic (cAppImpl *pObject) noexcept
 
virtual ~cSingletonStatic () noexcept
 
- Protected Attributes inherited from GrayLib::cWinResMod
HMODULE m_hModule
 
- Protected Attributes inherited from GrayLib::cAppConfigX
cStringF m_sProfileName
 The full path to the profile specific to this app. (or just "Appname" for a m_sRegistryKey ) More...
 
cIniFile m_IniFile
 Cached open INI file. (if we use it) More...
 
bool m_bIniFileModified
 If we are using the m_IniFile file vs the registry then we need to write it. More...
 
- Static Protected Attributes inherited from Gray::cSingletonStatic< cAppImpl >
static cAppImplsm_pThe
 pointer to the one and only object of this TYPE. ASSUME automatically init to = nullptr. More...
 

Detailed Description

the current application is a Windows GUI app. cSingletonStatic in process space. theApp. extends/compliments cAppState but for _WIN32 only. Similar to MFC CWinApp type often named theApp Similar to Gtk::Main() can be used with CAtlServiceModuleT, cNTServiceImpl

Constructor & Destructor Documentation

◆ CWinApp()

GrayLib::CWinApp::CWinApp ( const FILECHAR_t pszAppName = nullptr)

◆ ~CWinApp()

GrayLib::CWinApp::~CWinApp ( )
virtual

Member Function Documentation

◆ get_Single()

static CWinApp* GrayLib::CWinApp::get_Single ( )
inlinestatic

overload cSingleton<cXObjMgr>

◆ I()

static CWinApp& GrayLib::CWinApp::I ( )
inlinestatic

overload cSingleton<cXObjMgr>

◆ InitInstance()

BOOL GrayLib::CWinApp::InitInstance ( )
overridevirtual
Note
MFC CWinApp::InitInstance returns BOOL (and takes no args)
Returns
true = OK. false = exit.

Reimplemented from Gray::cAppImpl.

◆ isSingleCreated()

static bool GrayLib::CWinApp::isSingleCreated ( )
inlinestatic

◆ isValidCheck()

virtual bool GrayLib::CWinApp::isValidCheck ( ) const
inlinevirtualnoexcept

◆ Main()

APP_EXITCODE_t GrayLib::CWinApp::Main ( HINSTANCE  hInstance,
SHOWWINDOW_t  nCmdShow 
)

Similar to MFC AfxWinMain()

◆ OnTickApp()

bool GrayLib::CWinApp::OnTickApp ( )
overridevirtual

Windows message loop.

Reimplemented from Gray::cAppImpl.

Member Data Documentation

◆ m_pszHelpFilePath

cStringF GrayLib::CWinApp::m_pszHelpFilePath

The path to the application's Help file. (if any) (MFC name)

◆ m_pszProfileName

const FILECHAR_t* GrayLib::CWinApp::m_pszProfileName

the path to the profile specific to this app. (else use m_pszRegistryKey)


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