ScummVM API documentation
Bagel::MFC::CWinApp Class Reference
Inheritance diagram for Bagel::MFC::CWinApp:
Bagel::MFC::CWinThread Bagel::MFC::Libs::EventLoop Bagel::MFC::CCmdTarget Bagel::MFC::CObject Bagel::HodjNPodj::Archeroids::CTheApp Bagel::HodjNPodj::Crypt::CTheApp Bagel::HodjNPodj::Life::CTheApp Bagel::HodjNPodj::Mankala::CMnkApp Bagel::HodjNPodj::Metagame::Demo::CTheApp Bagel::HodjNPodj::Metagame::Frame::CTheApp Bagel::HodjNPodj::Metagame::Gtl::CGtlApp

Public Member Functions

 CWinApp (const char *appName=nullptr)
 
int Run ()
 
virtual bool InitApplication ()
 
virtual bool SaveAllModified ()
 
void SetDialogBkColor ()
 
HCURSOR LoadStandardCursor (const char *lpszCursorName)
 
HCURSOR LoadCursor (const char *lpszResourceName)
 
HCURSOR LoadCursor (unsigned int nIDResource)
 
HCURSOR SetCursor (HCURSOR hCursor)
 
void BeginWaitCursor ()
 
void EndWaitCursor ()
 
void DoWaitCursor (int nCode) override
 
void AddDocTemplate (CDocTemplate *pTemplate)
 
void CloseAllDocuments (bool bEndSession)
 
unsigned int GetProfileInt (const char *lpszSection, const char *lpszEntry, int nDefault)
 
void WriteProfileInt (const char *lpszSection, const char *lpszEntry, int nValue)
 
CString GetProfileString (const char *lpszSection, const char *lpszEntry, const char *lpszDefault=nullptr)
 
bool WriteProfileString (const char *lpszSection, const char *lpszEntry, const char *lpszValue)
 
virtual void OnFileNew ()
 
virtual void OnFileOpen ()
 
virtual void OnFilePrintSetup ()
 
CHandleMap< CGdiObject > * afxMapHGDIOBJ (bool bCreate=false)
 
CHandleMap< CDC > * afxMapHDC (bool bCreate=false)
 
CHandleMap< CWnd > * afxMapWnd (bool bCreate=false)
 
void AfxUnlockTempMaps ()
 
void setDirectory (const char *folder)
 
void setPalette (const Graphics::Palette &pal)
 
byte getColor (COLORREF color) const
 
Graphics::ScreengetScreen ()
 
void addResources (const Common::Path &file)
 
void removeResources (const Common::Path &file)
 
HRSRC findResource (const char *lpName, const char *lpType)
 
size_t sizeofResource (HRSRC hResInfo)
 
HGLOBAL loadResource (HRSRC hResInfo)
 
void * lockResource (HGLOBAL hResData)
 
void unlockResource (HGLOBAL hResData)
 
bool freeResource (HGLOBAL hResData)
 
const Libs::ResourcesgetResources () const
 
int addFontResource (const char *fontName)
 
bool removeFontResource (const char *fontName)
 
HFONT createFont (int nHeight, int nWidth, int nEscapement, int nOrientation, int nWeight, byte bItalic, byte bUnderline, byte cStrikeOut, byte nCharSet, byte nOutPrecision, byte nClipPrecision, byte nQuality, byte nPitchAndFamily, const char *lpszFacename)
 
HFONT getFont (const char *lpszFacename, int nHeight)
 
HFONT getDefaultFont ()
 
HPEN getDefaultPen () const
 
HBRUSH getDefaultBrush ()
 
HPALETTE getSystemPalette ()
 
const char * AfxRegisterWndClass (unsigned int nClassStyle, HCURSOR hCursor, HBRUSH hbrBackground, HICON hIcon)
 
bool GetClassInfo (HINSTANCE hInstance, const char *lpClassName, LPWNDCLASS lpWndClass)
 
- Public Member Functions inherited from Bagel::MFC::CCmdTarget
virtual const AFX_MSGMAPGetMessageMap () const
 
void BeginWaitCursor ()
 
void EndWaitCursor ()
 
void RestoreWaitCursor ()
 
bool OnCmdMsg (unsigned int nID, int nCode, void *pExtra, AFX_CMDHANDLERINFO *pHandlerInfo)
 
- Public Member Functions inherited from Bagel::MFC::CObject
 CObject (const CObject &)=default
 
CObjectoperator= (const CObject &)=default
 
virtual const CRuntimeClassGetRuntimeClass () const
 
virtual void AssertValid () const
 
virtual void Dump (CDumpContext &dc) const
 
bool IsKindOf (const CRuntimeClass *pClass) const
 
- Public Member Functions inherited from Bagel::MFC::Libs::EventLoop
void runEventLoop ()
 
void SetActiveWindow (CWnd *wnd)
 
void PopActiveWindow ()
 
CWndGetActiveWindow () const
 
void doModal (CWnd *wnd)
 
void checkMessages ()
 
bool pollEvents (Common::Event &event)
 
bool PeekMessage (LPMSG lpMsg, HWND hWnd, unsigned int wMsgFilterMin, unsigned int wMsgFilterMax, unsigned int wRemoveMsg)
 
bool PostMessage (HWND hWnd, unsigned int Msg, WPARAM wParam, LPARAM lParam)
 
void TranslateMessage (LPMSG lpMsg)
 
void DispatchMessage (LPMSG lpMsg)
 
bool shouldQuit () const
 
bool isQuitting () const
 
void quit ()
 
void SetCapture (HWND hWnd)
 
void ReleaseCapture ()
 
HWND GetCapture () const
 
Common::Point getMousePos () const
 
void setMousePos (const Common::Point &pt)
 
void SetFocus (CWnd *wnd)
 
CWndGetFocus () const
 
MMRESULT joySetCapture (HWND hwnd, unsigned int uJoyID, unsigned int uPeriod, bool fChanged)
 
MMRESULT joySetThreshold (unsigned int uJoyID, unsigned int uThreshold)
 
MMRESULT joyGetPos (unsigned int uJoyID, LPJOYINFO pji)
 
MMRESULT joyReleaseCapture (unsigned int uJoyID)
 
HHOOK HookKeyboard (HOOKPROC proc)
 
void UnhookKeyboard (HHOOK hook)
 
uintptr SetTimer (HWND hWnd, uintptr nIDEvent, unsigned int nElapse, void(CALLBACK *lpfnTimer)(HWND, unsigned int, uintptr, uint32))
 
bool KillTimer (HWND hWnd, uintptr nIDEvent)
 
void pause ()
 
WndListafxUpdateWnds ()
 
virtual bool OnIdle (long lCount)
 
void setKeybinder (KeybindProc proc)
 
void setFocusChangeProc (FocusChangeProc proc)
 

Public Attributes

int m_nCmdShow = SW_SHOWNORMAL
 
const char * m_lpCmdLine = ""
 
CWndm_pMainWnd = nullptr
 
CPalette _systemPalette
 
CPalette _currentPalette
 
CFont _defaultFont
 
CPen _defaultPen
 
CBrush _defaultBrush
 
MSG _currentMessage
 
CDocManagerm_pDocManager = nullptr
 

Static Public Attributes

static CWinApp_activeApp
 
- Static Public Attributes inherited from Bagel::MFC::CObject
static const CRuntimeClass classCObject
 

Protected Member Functions

virtual bool InitInstance ()
 
virtual int ExitInstance ()
 
- Protected Member Functions inherited from Bagel::MFC::CCmdTarget
const AFX_MSGMAP_ENTRYLookupMessage (unsigned int message)
 
const AFX_MSGMAP_ENTRYAfxFindMessageEntry (const AFX_MSGMAP_ENTRY *lpEntry, unsigned int nMsg, unsigned int nCode, unsigned int nID)
 
bool _AfxDispatchCmdMsg (CCmdTarget *pTarget, unsigned int nID, int nCode, AFX_PMSG pfn, void *pExtra, unsigned int nSig, AFX_CMDHANDLERINFO *pHandlerInfo)
 

Additional Inherited Members

- Static Public Member Functions inherited from Bagel::MFC::CCmdTarget
static const AFX_MSGMAPGetThisMessageMap ()
 
- Protected Types inherited from Bagel::MFC::Libs::EventLoop
enum  QuitFlag { QUIT_NONE, QUIT_QUITTING, QUIT_QUIT }
 
- Protected Attributes inherited from Bagel::MFC::Libs::EventLoop
QuitFlag _quitFlag = QUIT_NONE
 

Member Function Documentation

◆ Run()

int Bagel::MFC::CWinApp::Run ( )

Main execution for MFC applications

◆ DoWaitCursor()

void Bagel::MFC::CWinApp::DoWaitCursor ( int  nCode)
overridevirtual

Adds or remove a wait mouse cursor

Parameters
nCode0 => restore, 1=> begin, -1=> end

Reimplemented from Bagel::MFC::CCmdTarget.

◆ addResources()

void Bagel::MFC::CWinApp::addResources ( const Common::Path file)
inline

Adds a Windows file containing resources


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