OWLNext    7.0
Borland's Object Windows Library for the modern age
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
applicat.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1991, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Definition of class TApplication. This defines the basic behavior for OWL
7/// applications. Also definition for TXInvalidMainWindow
8//----------------------------------------------------------------------------
9
10#if !defined(OWL_APPLICAT_H)
11#define OWL_APPLICAT_H
12
13#include <owl/private/defs.h>
14#if defined(BI_HAS_PRAGMA_ONCE)
15# pragma once
16#endif
17
18#include <owl/defs.h>
19#include <owl/module.h>
20#include <owl/eventhan.h>
21#include <owl/msgthred.h>
22#include <owl/gdibase.h>
23#include <owl/lclstrng.h>
24
25#include <stdexcept>
26#include <memory>
27
28namespace owl {
29
30#if defined(OWL_SUPPORT_BWCC)
31//
32// Language defines for TApplication::EnableBWCC()
33//
34#define BWCC_LANG_GERMAN 0x07
35#define BWCC_LANG_US 0x09
36#define BWCC_LANG_FRENCH 0x0c
37#endif
38
39class _OWLCLASS TWindow;
40class _OWLCLASS TFrameWindow;
41class _OWLCLASS TDocManager;
42class _OWLCLASS TAppDictionary;
43class _OWLCLASS TXInvalidMainWindow;
44
45#if defined(OWL_SUPPORT_BWCC)
47#endif
48
49#if defined(OWL_SUPPORT_CTL3D)
51#endif
52
53class _OWLCLASS TCursor;
54class _OWLCLASS TTooltip;
55class TWaitHook;
56
58
60
63_OWLFUNC(int) OWLMessageBox(TWindow* wnd, TResId resId, const tstring& caption, uint type, TModule* module = nullptr);
64_OWLFUNC(int) OWLMessageBox(TWindow* wnd, TResId resId, const LPCTSTR caption, uint type, TModule* module = nullptr);
65
66#include <owl/preclass.h>
67//
68/// \class TWaitCursor
69// ~~~~~ ~~~~~~~~~~~
70//
71/// TWaitCursor is a simple class used to display a wait cursor. Wait cursors are
72/// typically created on the stack so that the prevous cursor is displayed when the
73/// wait cursor goes out of scope.
74///
75/// Wait cursors can be nested, but there destruction sequence must be opposite to
76/// their construction sequence.
77//
78/// Typical Use
79/// \code
80/// ...
81/// {
82/// TWaitCursor wc; // Wait cursor displayed.
83/// ...
84/// ...
85/// }
86/// // Wait cursor out of scope so previous cursor restored.
87/// \endcode
88//
90 public:
92 TWaitCursor(const tstring& msg);
95
96 void Restore();
97 void SetCursor(TCursor* cursor, TAutoDelete = AutoDelete);
98 void Message(const tstring& text);
99
100 private:
101 void Init();
102
103 TWaitCursor* Next; ///< Pointer to previous cursor in the applications chain.
104
105 friend class TWaitHook;
106};
107//
108/// \struct TCurrentEvent
109// ~~~~~~ ~~~~~~~~~~~~~
110/// Current event structure for windows events
111//
113{
114 TWindow* Win; ///< Window that message was sent/dispatched to
115 TMsgId Message; ///< Message ID
116 TParam1 Param1; ///< First parameter (WPARAM)
117 TParam2 Param2; ///< Second parameter (LPARAM)
118
120};
121
122/// \addtogroup module
123/// @{
124/// \class TApplication
125// ~~~~~ ~~~~~~~~~~~~
126/// Derived from TModule and TMsgThread and virtually derived from TEventHandler,
127/// TApplication acts as an object-oriented stand-in for an application module.
128/// TApplication and TModule supply the basic behavior required of an application.
129/// TApplication member functions create instances of a class, create main windows,
130/// and process messages.
131///
132/// To create an OLE-enabled Doc/View application, you need to derive your
133/// application from both TApplication and TOcAppHost.
134///
135/// \note If a document manager is installed (see SetDocManager), TApplication will give the
136/// document manager the first stab at event handling. See the TApplication::Find implementation.
137//
138class _OWLCLASS TApplication : virtual public TEventHandler,
139 public TModule,
140 public TMsgThread
141{
142 public:
143 // Constructors for TApplication. Default args for the ctor allow
144 // TApplication to access global pointers in the user exe/dll.
145 // Default OwlAppDictionary can be overridden by passing non-0 appDict arg
146 //
148 (
149 LPCTSTR name = nullptr,
151 TAppDictionary* = nullptr
152 );
153
155 (
156 const tstring& name,
158 TAppDictionary* = nullptr
159 );
160
162 (
165 HINSTANCE hPrevInstance,
166 const tstring& cmdLine,
167 int cmdShow,
169 TAppDictionary* = nullptr
170 );
171
173 (
174 const tstring& name,
176 HINSTANCE hPrevInstance,
177 const tstring& cmdLine,
178 int cmdShow,
180 TAppDictionary* = nullptr
181 );
182
183 ~TApplication() override;
184
185 TFrameWindow* GetMainWindow();
186 TDocManager* GetDocManager();
187 TLangId GetLangId() const;
188 void SetLangId(TLangId landid);
189
190 void ClearMainWindow(); // Called by the main window destructor
191
192 static void SetWinMainParams
193 (
195 HINSTANCE hPrevInstance,
196 const tstring& cmdLine,
197 int cmdShow
198 );
199
200 void GetWinMainParams();
201
202 HINSTANCE GetPrevInstance() const;
203 void SetPrevInstance(HINSTANCE pi);
204
205 int GetCmdShow() const;
206 void SetCmdShow(int cmdshow);
207
208 static tstring& GetCmdLine();
209 TCurrentEvent& GetCurrentEvent();
210
211 virtual bool CanClose();
212 auto Run() -> int override;
213 virtual int Start() noexcept;
214
215 /// \name Message queue thread synchronization mechanism
216 /// @{
217#if defined(BI_MULTI_THREAD_RTL)
218 typedef TMsgThread::TQueueLock TAppLock;
219
220 /// Override TEventHandler::Dispatch() to handle multi-thread
221 /// synchronization
222 //
223 virtual TResult Dispatch(TEventInfo& info, TParam1, TParam2 = 0);
224#endif
225 /// @}
226
227 /// \name Message queue loop & response functions
228 /// @{
229 auto MessageLoop() -> int override;
230 auto IdleAction(long idleCount) -> bool override;
231 auto ProcessMsg(MSG&) -> bool override;
232 virtual bool ProcessAppMsg(MSG& msg);
233 /// @}
234
235 virtual void WaitOnObject(HANDLE handle, bool wait);
236 virtual void ObjectSignaled(HANDLE /*handle*/, bool /*abandoned*/) {}
237
238 /// \name Exception propagation mechanism
239 /// @{
240 void SuspendThrow(std::exception_ptr);
241 void ResumeThrow();
242 bool HasSuspendedException() const {return !(CurrentException == std::exception_ptr());}
243 /// @}
244
245 /// Get the TWindow pointer belonging to this app given an hWnd
246 //
248
249 /// \name Begin and end of a modal window's modal message loop
250 /// @{
251 int BeginModal(TWindow* window, int flags=MB_APPLMODAL);
252 void EndModal(int result);
253 virtual void PreProcessMenu(HMENU hMenubar);
254 /// @}
255
256 /// \name Dead TWindow garbage collection
257 /// @{
258 void Condemn(TWindow* win);
259 void Uncondemn(TWindow* win);
260 /// @}
261
262 /// Call this function after each msg dispatch if TApplication's message
263 /// loop is not used.
264 //
265 void PostDispatchAction();
266
267 /// \name Control of UI enhancing libraries
268#if defined(OWL_SUPPORT_BWCC)
269 /// @{
270 void EnableBWCC(bool enable = true, uint language = 0);
271 bool BWCCEnabled() const;
272 TBwccDll* GetBWCCModule() const;
273#endif
274
275#if defined(OWL_SUPPORT_CTL3D)
276 void EnableCtl3d(bool enable = true);
277 void EnableCtl3dAutosubclass(bool enable) const;
278 bool Ctl3dEnabled() const;
279 TCtl3dDll* GetCtl3dModule() const;
280#endif
281 /// @}
282
283 // Opens a modal message box
284 //
285 int MessageBox
286 (
287 HWND wnd,
288 const tstring& text,
289 const tstring& caption = tstring(),
290 uint type = MB_OK
291 ) const;
292
293 virtual int MessageBox
294 (
295 HWND wnd,
297 LPCTSTR caption = nullptr,
298 uint type = MB_OK
299 ) const;
300
301 // Retrieves/enables tooltip
302 //
303 virtual TTooltip* GetTooltip() const;
304 virtual void EnableTooltip(bool enable=true);
305
306 /// \name TEventHandler overrides
307 /// @{
308
309 auto Find(TEventInfo&, TEqualOperator = nullptr) -> bool override;
310
311 /// @}
312
313 protected:
314 virtual void InitApplication();
315 void InitInstance() override;
316 virtual void InitMainWindow();
317 auto TermInstance(int status) -> int override;
318
319 /// Assigns tooltip
320 void SetTooltip(TTooltip* tooltip);
321
322 // (Re)set a new main-window and DocManager either at construction or
323 // sometime later
324 //
325 TFrameWindow* SetMainWindow(TFrameWindow* window);
326 auto SetMainWindow(std::unique_ptr<TFrameWindow>) -> std::unique_ptr<TFrameWindow>;
327 TDocManager* SetDocManager(TDocManager* docManager);
328 auto SetDocManager(std::unique_ptr<TDocManager>) -> std::unique_ptr<TDocManager>;
329
330 // Member data -- use accessors to get at these
331 //
333 HINSTANCE hPrevInstance;
334 int nCmdShow;
335 TDocManager* DocManager;
336 TFrameWindow* MainWindow;
337 TLangId LangId;
338 TTooltip* Tooltip;
339
341 tstring CmdLine; ///< string object copy of cmd line
342
343 DWORD WaitCount;
344 LPHANDLE WaitHandles;
345
346 private:
347#if defined(OWL_SUPPORT_BWCC)
348 bool BWCCOn;
350#endif
351
352#if defined(OWL_SUPPORT_CTL3D)
353 bool Ctl3dOn;
355#endif
356
357 TCurrentEvent CurrentEvent;
358 std::exception_ptr CurrentException;
359
360 /// \name Condemned TWindow garbage collection
361 /// @{
362 void DeleteCondemned();
363 TWindow* CondemnedWindows; ///< List of comdemned windows.
364 /// @}
365
366 /// The dictionary that this app is in
367 //
368 TAppDictionary* Dictionary;
369
370 // Static application initialization parameters cached here before app
371 // is actually constructed
372 //
373 static HINSTANCE InitHInstance; ///< WinMain's 1st param
374 static HINSTANCE InitHPrevInstance; ///< WinMain's 2nd param
375 static tstring& GetInitCmdLine(); ///< WinMain's 3rd param
376 static int InitCmdShow; ///< WinMain's 4th param
377
378 /// \name Event handlers for response table entries
379 /// @{
380
381 void EvSysCommand(uint cmd, const TPoint&);
382 void CmExit(); ///< Exit from file menu
383
384 /// @}
385
386 // Hidden to prevent accidental copying or assignment
387 //
390
392};
393
394/// @}
395
396DECLARE_STREAMABLE_INLINES( TApplication );
397
398#if defined(OWL_SUPPORT_BWCC)
399/// \addtogroup module
400/// @{
401/// \class TBwccDll
402// ~~~~~ ~~~~~~~~
403/// Wrapper for the BWCC Dll
404//
405/// The TBwccDll class encapsulates the Borland Windows Custom Control (BWCC) DLL
406/// (BWCC[32].DLL). It provides an easy method to dynamically test for the
407/// availability of the DLL and bind to its exported functions at runtime. By using
408/// the TBwccDll class instead of direct calls to the BWCC DLL, ObjectWindows
409/// applications can provide the appropriate behavior when running in an environment
410/// where the DLL is not available.
411///
412/// Each data member of the TBwccDll class corresponds to the API with a similar
413/// name exposed by the BWCC DLL. For example, TBwccDll::MessageBox corresponds to
414/// the BWCCMessageBox API exported by the BWCC DLL.
415//
416/// \note In modern applications BWCC should not be used. It is retained only for
417/// backwards compatibility and porting of legacy applications.
418//
419class _OWLCLASS TBwccDll : public TModule {
420 public:
421 TBwccDll();
422
423 // Used by TApplication
424 //
428
429 // Not used by OWL
438 TModuleProc0<DWORD> GetVersion;
439};
440
441/// @}
442#endif
443
444#if defined(OWL_SUPPORT_CTL3D)
445/// \addtogroup module
446/// @{
447/// \class TCtl3dDll
448// ~~~~~ ~~~~~~~~~
449/// Wrapper for the Control 3D Dll
450//
451/// The TCtl3dDll class encapsulates the Control 3D DLL (CTL3D[V2|32].DLL). It
452/// provides an easy method to dynamically test for the availability of the DLL and
453/// bind to its exported functions at runtime. By using the TCtl3dDll class instead
454/// of direct calls to the Control 3D DLL, ObjectWindows applications can provide
455/// the appropriate behavior when running in an environment where the DLL is not
456/// available.
457///
458/// Each data member of the TCtl3dDll class corresponds to the API with a similar
459/// name exposed by the Control 3D DLL. For example, TCtl3dDll::AutoSubclass
460/// corresponds to the Ctl3dAutoSubclass API exported by the Control 3D DLL.
461//
462class _OWLCLASS TCtl3dDll : public TModule {
463 public:
464 TCtl3dDll();
465
466 // Used by TApplication
468 TModuleProc1<BOOL,HANDLE> Unregister;
470
471 // Used by TDialog
474
475 // Not used by OWL
478 TModuleProc0<BOOL> Enabled;
482
484};
485/// @}
486#endif
487
488/// \addtogroup except
489/// @{
490// class TXInvalidMainWindow
491// ~~~~~ ~~~~~~~~~~~~~~~~~~~
492//
493/// A nested class, TXInvalidMainWindow describes an exception that results from an
494/// invalid Window. This exception is thrown if there is not enough memory to create
495/// a window or a dialog object. TApplication::InitInstance throws this exception if
496/// it can't initialize an instance of an application object.
497//
499 public:
501
502 TXInvalidMainWindow* Clone();
503 void Throw();
504
505 static void Raise();
506};
507/// @}
508
509
510/// \addtogroup module
511/// @{
512/// \class TLangModule
513// ~~~~~ ~~~~~~~~~~~
514/// International resource support: [APP]ENG.DLL - default application module.
515//
516/// Module == TApplication if not found any resource module.
517//
518/// Usage:
519/// \code
520/// static TLangModule* langModulePtr = 0;
521/// TLangModule* GetResModule()
522/// {
523/// return langModulePtr;
524/// }
525///
526/// int OwlMain(int,LPCTSTR*)
527/// {
528/// TMyAppl appl;
529/// TLangModule langModule("MRES_",appl); // will be MRES_###.dll
530/// langModulePtr = &langModule;
531/// return appl.Run();
532/// }
533/// \endcode
535 public:
536 // export function: void __stdcall InitLanguage();
537 typedef void (*InitLanguage)();
538 // Constructors & destructor
539 //
541 virtual ~TLangModule();
542
543 operator TModule*() { return Module; }
544 TModule* GetModule() { return Module; }
545
546 void SetLanguage(const TLangId& langId);
547 TLangId GetLanguage() const { return LangId;}
548
549 protected:
554};
555/// @}
556
557
558#include <owl/posclass.h>
559
560//----------------------------------------------------------------------------
561// Inline implementations
562//
563/// Activates the wait cursor.
564//
566{
567 Init();
568}
569//
570/// Activates the wait cursor and sends msg to the applications
571/// TMessageBar::SetHintText function if it has one.
572//
574{
575 Init();
576 Message(msg);
577}
578//
579/// Activates cursor. If TAutoDelete is set to AutoDelete the cursor resource is
580/// deleted when the wait cursor is destoryed.
581//
587
588////////////////////
589//
590/// Return the current main window.
591//
593{
594 return MainWindow;
595}
596
597//
598/// Return the current document manager.
599//
601{
602 return DocManager;
603}
604
605//
606/// Return the HINSTANCE of the previous running instance.
607//
609{
610 return hPrevInstance;
611}
612
613//
614/// Set the previous instance.
615/// This should not be called by normal programs.
616//
618{
619 hPrevInstance = pi;
620}
621
622//
623/// Retrieve the initial state of the main window.
624//
625inline int TApplication::GetCmdShow() const
626{
627 return nCmdShow;
628}
629
630//
631/// Sets the initial state of the main window.
632/// Typically passed by the operating system.
633//
635{
636 nCmdShow = cmdshow;
637}
638
639//
640/// Return the command line of the application.
641/// Most programs do not need to call this because OwlMain has the
642/// parameters already parsed.
643//
645{
646 return GetInitCmdLine();
647}
648
649//
650/// Return the current event from the message queue.
651//
653{
654 return CurrentEvent;
655}
656
658
659//
660/// Return the window pointer given a window's handle.
661//
662/// Retrieves a TWindow pointer associated with the handle to a window (hWnd),
663/// allowing more than one application to share the same HWND.
664//
666{
667 return ::owl::GetWindowPtr(hWnd, this);
668}
669
670//
671/// Returns identifier of language used by application.
672//
674 return LangId;
675}
676//
677/// Sets new language for use with application. Note that it only sets
678/// the variable LangId.
679//
681 LangId = landid;
682}
683
684//
685/// Set the data members with data from WinMain.
686//
687/// The ObjectWindows default WinMain function calls SetMainWinParams so that
688/// TApplication can store the parameters for future use. To construct an
689/// application instance, WinMain calls the OwlMain function that is in the user's
690/// code. As it is being constructed, the application instance can fill in the
691/// parameters using those set earlier by SetMainWinParams.
692//
694(
696 HINSTANCE hPrevInstance,
697 const tstring& cmdLine,
698 int cmdShow
699)
700{
701 InitHInstance = hInstance;
702 InitHPrevInstance = hPrevInstance;
703 GetInitCmdLine() = cmdLine;
704 InitCmdShow = cmdShow;
705}
706
707//
708/// Retrieve the WinMain parameters.
709//
710/// Initializes a static instance of an application. ObjectWindows OwlMain uses this
711/// function to support static application instances.
712//
714{
715 InitModule(InitHInstance, GetInitCmdLine());
716 hPrevInstance = InitHPrevInstance;
717 nCmdShow = InitCmdShow;
718}
719
720#if defined(OWL_SUPPORT_BWCC)
721//
722/// Indicates if the Borland Custom Controls library (BWCC) is enabled. Returns true
723/// if BWCC is enabled and false if BWCC is disabled.
724//
725inline bool TApplication::BWCCEnabled() const
726{
727 return BWCCOn;
728}
729
730//
731/// Returns a pointer to the enabled Borland Windows Custom Controls library (BWCC)
732/// module.
733//
734inline TBwccDll* TApplication::GetBWCCModule() const
735{
736 return BWCCModule;
737}
738#endif
739
740#if defined(OWL_SUPPORT_CTL3D)
741//
742/// Returns true if the Microsoft 3-D Controls Library DLL is enabled. This DLL
743/// gives controls a three-dimensional look and feel.
744//
745inline bool TApplication::Ctl3dEnabled() const
746{
747 return Ctl3dOn;
748}
749
750//
751/// If Ctl3D is enabled, return the module associated with it.
752//
753inline TCtl3dDll* TApplication::GetCtl3dModule() const
754{
755 return Ctl3dModule;
756}
757#endif
758
759//
760/// Get Tooltip
761//
763{
764 return Tooltip;
765}
766
767/// Called by the main window (TFrameWindow) destructor to zero the MainWindow member
769{
770 MainWindow = nullptr;
771}
772
773inline int
775{
776 return MessageBox(wnd, text.c_str(), caption.empty() ? nullptr : caption.c_str(), type);
777}
778
779
780} // OWL namespace
781
782#endif // OWL_APPLICAT_H
TAppDictionary implementation for DLLs only.
Definition appdict.h:30
Derived from TModule and TMsgThread and virtually derived from TEventHandler, TApplication acts as an...
Definition applicat.h:141
TDocManager * GetDocManager()
Return the current document manager.
Definition applicat.h:600
int GetCmdShow() const
Retrieve the initial state of the main window.
Definition applicat.h:625
TCurrentEvent & GetCurrentEvent()
Return the current event from the message queue.
Definition applicat.h:652
virtual void ObjectSignaled(HANDLE, bool)
Definition applicat.h:236
void SetPrevInstance(HINSTANCE pi)
Set the previous instance.
Definition applicat.h:617
static tstring & GetCmdLine()
Return the command line of the application.
Definition applicat.h:644
void GetWinMainParams()
Retrieve the WinMain parameters.
Definition applicat.h:713
int MessageBox(HWND wnd, const tstring &text, const tstring &caption=tstring(), uint type=MB_OK) const
Definition applicat.h:774
HINSTANCE GetPrevInstance() const
Return the HINSTANCE of the previous running instance.
Definition applicat.h:608
TWindow * GetWindowPtr(HWND hWnd) const
Get the TWindow pointer belonging to this app given an hWnd.
Definition applicat.h:665
void ClearMainWindow()
Called by the main window (TFrameWindow) destructor to zero the MainWindow member.
Definition applicat.h:768
void SetLangId(TLangId landid)
Sets new language for use with application.
Definition applicat.h:680
void SetCmdShow(int cmdshow)
Sets the initial state of the main window.
Definition applicat.h:634
bool HasSuspendedException() const
Definition applicat.h:242
TLangId GetLangId() const
Returns identifier of language used by application.
Definition applicat.h:673
static void SetWinMainParams(HINSTANCE hInstance, HINSTANCE hPrevInstance, const tstring &cmdLine, int cmdShow)
Set the data members with data from WinMain.
Definition applicat.h:694
TFrameWindow * GetMainWindow()
Return the current main window.
Definition applicat.h:592
virtual TTooltip * GetTooltip() const
Get Tooltip.
Definition applicat.h:762
TCursor, derived from TGdiBase, represents the GDI cursor object class.
Definition gdiobjec.h:730
TDocManager creates a document manager object that manages the list of current documents and register...
Definition docmanag.h:100
A nested class, TEventInfo provides specific information about the type of message sent,...
Definition eventhan.h:170
TEventHandler is a base class from which you can derive classes that handle messages.
Definition eventhan.h:162
Derived from TWindow, TFrameWindow controls such window-specific behavior as keyboard navigation and ...
Definition framewin.h:96
International resource support: [APP]ENG.DLL - default application module.
Definition applicat.h:534
TModule * GetModule()
Definition applicat.h:544
TApplication * Application
Definition applicat.h:552
TLangId GetLanguage() const
Definition applicat.h:547
TModule * Module
Definition applicat.h:551
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:75
TMsgThread implements basic behavior for threads that own message queues, including mutex locking for...
Definition msgthred.h:45
TPoint is a support class, derived from tagPOINT.
Definition geometry.h:87
TTooltip encapsulates a tooltip window - i.e.
Definition tooltip.h:175
TWaitCursor is a simple class used to display a wait cursor.
Definition applicat.h:89
void Message(const tstring &text)
Sends text to the applications TMessageBar::SetHintText function if it has one.
TWaitCursor()
Activates the wait cursor.
Definition applicat.h:565
void SetCursor(TCursor *cursor, TAutoDelete=AutoDelete)
Changes the cursor to cursor.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
A nested class, TXInvalidMainWindow describes an exception that results from an invalid Window.
Definition applicat.h:498
TXOwl is root class of the ObjectWindows exception hierarchy.
Definition except.h:38
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)
Definition objstrm.h:1529
TAutoDelete
Flag for Handle ctors to control Handle deletion in dtor.
Definition gdibase.h:70
#define DECLARE_STREAMABLE_INLINES(cls)
Definition objstrm.h:1538
@ AutoDelete
Definition gdibase.h:70
void InitModule(THandle handle, const tstring &cmdLine)
Finish-up initialization of a module.
Definition module.cpp:470
TLocaleString - localized name support.
Definition of class TModule.
Definition of message queue oriented thread class support.
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
TMessageBox SetDefMessageBox(TMessageBox)
Definition applicat.cpp:218
int OWLMessageBox(HWND wnd, const tstring &text, const tstring &caption, uint type)
Definition applicat.cpp:228
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).
Definition window.cpp:1557
owl::uint16 TLangId
Holds a language ID, a predefined number that represents a base language and dialect.
Definition lclstrng.h:26
int(* TMessageBox)(HWND wnd, LPCTSTR text, const LPCTSTR caption, uint type)
Definition applicat.h:57
TModule * Module
Definition global.cpp:34
std::string tstring
Definition defs.h:79
unsigned int uint
Definition number.h:25
General definitions used by all ObjectWindows programs.
#define protected_data
Definition defs.h:208
#define public_data
Definition defs.h:207
#define _OWLFUNC(p)
Definition defs.h:341
#define _OWLCLASS
Definition defs.h:338
Current event structure for windows events.
Definition applicat.h:113
TMsgId Message
Message ID.
Definition applicat.h:115
TWindow * Win
Window that message was sent/dispatched to.
Definition applicat.h:114
TParam1 Param1
First parameter (WPARAM)
Definition applicat.h:116
TParam2 Param2
Second parameter (LPARAM)
Definition applicat.h:117