10#if !defined(OWL_APPLICAT_H)
14#if defined(BI_HAS_PRAGMA_ONCE)
30#if defined(OWL_SUPPORT_BWCC)
34#define BWCC_LANG_GERMAN 0x07
35#define BWCC_LANG_US 0x09
36#define BWCC_LANG_FRENCH 0x0c
45#if defined(OWL_SUPPORT_BWCC)
49#if defined(OWL_SUPPORT_CTL3D)
105 friend class TWaitHook;
190 void ClearMainWindow();
192 static void SetWinMainParams
200 void GetWinMainParams();
205 int GetCmdShow()
const;
211 virtual bool CanClose();
212 auto Run() ->
int override;
213 virtual int Start()
noexcept;
217#if defined(BI_MULTI_THREAD_RTL)
218 typedef TMsgThread::TQueueLock
TAppLock;
229 auto MessageLoop() ->
int override;
230 auto IdleAction(
long idleCount) ->
bool override;
231 auto ProcessMsg(
MSG&) ->
bool override;
232 virtual bool ProcessAppMsg(
MSG&
msg);
240 void SuspendThrow(std::exception_ptr);
252 void EndModal(
int result);
265 void PostDispatchAction();
268#if defined(OWL_SUPPORT_BWCC)
275#if defined(OWL_SUPPORT_CTL3D)
293 virtual int MessageBox
303 virtual TTooltip* GetTooltip()
const;
304 virtual void EnableTooltip(
bool enable=
true);
309 auto Find(TEventInfo&, TEqualOperator =
nullptr) ->
bool override;
314 virtual void InitApplication();
315 void InitInstance()
override;
316 virtual void InitMainWindow();
317 auto TermInstance(
int status) ->
int override;
326 auto SetMainWindow(std::unique_ptr<TFrameWindow>) -> std::unique_ptr<TFrameWindow>;
328 auto SetDocManager(std::unique_ptr<TDocManager>) -> std::unique_ptr<TDocManager>;
347#if defined(OWL_SUPPORT_BWCC)
352#if defined(OWL_SUPPORT_CTL3D)
358 std::exception_ptr CurrentException;
362 void DeleteCondemned();
375 static tstring& GetInitCmdLine();
376 static int InitCmdShow;
398#if defined(OWL_SUPPORT_BWCC)
444#if defined(OWL_SUPPORT_CTL3D)
537 typedef void (*InitLanguage)();
610 return hPrevInstance;
646 return GetInitCmdLine();
667 return ::owl::GetWindowPtr(
hWnd,
this);
702 InitHPrevInstance = hPrevInstance;
716 hPrevInstance = InitHPrevInstance;
717 nCmdShow = InitCmdShow;
720#if defined(OWL_SUPPORT_BWCC)
725inline bool TApplication::BWCCEnabled()
const
734inline TBwccDll* TApplication::GetBWCCModule()
const
740#if defined(OWL_SUPPORT_CTL3D)
745inline bool TApplication::Ctl3dEnabled()
const
753inline TCtl3dDll* TApplication::GetCtl3dModule()
const
770 MainWindow =
nullptr;
TAppDictionary implementation for DLLs only.
Derived from TModule and TMsgThread and virtually derived from TEventHandler, TApplication acts as an...
TDocManager * GetDocManager()
Return the current document manager.
int GetCmdShow() const
Retrieve the initial state of the main window.
TCurrentEvent & GetCurrentEvent()
Return the current event from the message queue.
virtual void ObjectSignaled(HANDLE, bool)
void SetPrevInstance(HINSTANCE pi)
Set the previous instance.
static tstring & GetCmdLine()
Return the command line of the application.
void GetWinMainParams()
Retrieve the WinMain parameters.
int MessageBox(HWND wnd, const tstring &text, const tstring &caption=tstring(), uint type=MB_OK) const
HINSTANCE GetPrevInstance() const
Return the HINSTANCE of the previous running instance.
TWindow * GetWindowPtr(HWND hWnd) const
Get the TWindow pointer belonging to this app given an hWnd.
void ClearMainWindow()
Called by the main window (TFrameWindow) destructor to zero the MainWindow member.
void SetLangId(TLangId landid)
Sets new language for use with application.
void SetCmdShow(int cmdshow)
Sets the initial state of the main window.
bool HasSuspendedException() const
TLangId GetLangId() const
Returns identifier of language used by application.
static void SetWinMainParams(HINSTANCE hInstance, HINSTANCE hPrevInstance, const tstring &cmdLine, int cmdShow)
Set the data members with data from WinMain.
TFrameWindow * GetMainWindow()
Return the current main window.
virtual TTooltip * GetTooltip() const
Get Tooltip.
TCursor, derived from TGdiBase, represents the GDI cursor object class.
TDocManager creates a document manager object that manages the list of current documents and register...
A nested class, TEventInfo provides specific information about the type of message sent,...
TEventHandler is a base class from which you can derive classes that handle messages.
Derived from TWindow, TFrameWindow controls such window-specific behavior as keyboard navigation and ...
International resource support: [APP]ENG.DLL - default application module.
TApplication * Application
TLangId GetLanguage() const
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TMsgThread implements basic behavior for threads that own message queues, including mutex locking for...
TPoint is a support class, derived from tagPOINT.
TWaitCursor is a simple class used to display a wait cursor.
void Message(const tstring &text)
Sends text to the applications TMessageBar::SetHintText function if it has one.
TWaitCursor()
Activates the wait cursor.
void SetCursor(TCursor *cursor, TAutoDelete=AutoDelete)
Changes the cursor to cursor.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
A nested class, TXInvalidMainWindow describes an exception that results from an invalid Window.
TXOwl is root class of the ObjectWindows exception hierarchy.
Definition of TEventHandler and related classes & macros.
Definition of base most abstract GDI object class, and associated exception class.
#define DECLARE_STREAMABLE_OWL(cls, ver)
TAutoDelete
Flag for Handle ctors to control Handle deletion in dtor.
#define DECLARE_STREAMABLE_INLINES(cls)
void InitModule(THandle handle, const tstring &cmdLine)
Finish-up initialization of a module.
TLocaleString - localized name support.
Definition of class TModule.
Definition of message queue oriented thread class support.
Object Windows Library (OWLNext Core)
TMessageBox SetDefMessageBox(TMessageBox)
int OWLMessageBox(HWND wnd, const tstring &text, const tstring &caption, uint type)
TWindow * GetWindowPtr(HWND, const TApplication *)
Raw function to retrieve a TWindow pointer given an HWND from the a given app, or any app (app==0).
owl::uint16 TLangId
Holds a language ID, a predefined number that represents a base language and dialect.
int(* TMessageBox)(HWND wnd, LPCTSTR text, const LPCTSTR caption, uint type)
General definitions used by all ObjectWindows programs.
Current event structure for windows events.
TMsgId Message
Message ID.
TWindow * Win
Window that message was sent/dispatched to.
TParam1 Param1
First parameter (WPARAM)
TParam2 Param2
Second parameter (LPARAM)