10#if defined(__BORLANDC__)
25#if defined(BI_MULTI_THREAD_RTL)
32#if defined(BI_COMP_MSC)
45#if defined(__BORLANDC__)
50# pragma warning(disable: 4996)
76 auto getAtomName = [](ATOM a) ->
tstring
78 auto b = array<tchar, 256>{};
79 const auto n = ::GetAtomName(a, b.data(),
static_cast<int>(b.size()));
93 Error = ::GetLastError();
103 ::SetLastError(
Error);
112 flags |= MB_SYSTEMMODAL;
120 return win->
MessageBox(message.c_str(), title, flags);
121 return ::MessageBox(
nullptr, message.c_str(), title.c_str(), flags);
130 if(::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
131 nullptr,
Error, langId, (LPTSTR)&ptr, 0,
nullptr) != 0)
138 wsprintf(buffer,
_T(
"Error: %#X occurred (no further info)"),
Error);
153 static bool Find(
TModule* module);
154 static void Add(
TModule* module);
155 static void Remove(
TModule* module);
160#if defined(BI_MULTI_THREAD_RTL)
167TPtrArray<TModule*>* __TModuleList::ModuleArray =
nullptr;
168#if defined(BI_MULTI_THREAD_RTL)
169TMRSWSection* __TModuleList::Lock =
nullptr;
172#if defined(BI_MULTI_THREAD_RTL)
173#define LOCKLIST(s) TMRSWSection::TLock __lock(*__TModuleList::Lock, s)
178TModule* __TModuleList::Next(TModule* module)
184 return (*ModuleArray)[0];
187 for(
uint i = 0; i < ModuleArray->Size(); i++){
188 if(module == (*ModuleArray)[i])
189 return (i+1 < ModuleArray->Size()) ? (*ModuleArray)[i+1] :
nullptr;
195void __TModuleList::Add(
TModule* module)
202#if defined(BI_MULTI_THREAD_RTL)
213 for (
uint i = 0; i < ModuleArray->Size(); i++)
215 if (module->GetHandle() == (*ModuleArray)[i]->GetHandle())
217 (*ModuleArray)[i] =
module;
223 ModuleArray->AddAt(module,0);
227void __TModuleList::Remove(
TModule* module)
235 ModuleArray->DetachItem(module);
236 if(ModuleArray->Empty())
239 ModuleArray =
nullptr;
242#if defined(BI_MULTI_THREAD_RTL)
250bool __TModuleList::Find(
TModule* module)
256 for (
uint i = 0; i < ModuleArray->Size(); i++){
257 if (module == (*ModuleArray)[i])
274 if((*Iter1)->FindResourceEx(
id, type, langId))
281 if((*Iter)->FindResource(
id, type))
292 return __TModuleList::Next(module);
311 TErrorMode loadMode(SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS);
312 Handle = ::LoadLibrary(name.c_str());
313 if (Handle <= HINSTANCE(HINSTANCE_ERROR) && mustLoad) {
314 TRACEX(OwlApp, 0,
_T(
"Unable to load DLL '") << name.c_str() <<
_T(
'\''));
322 ShouldFree = shouldLoad;
329 __TModuleList::Add(
this);
350 __TModuleList::Add(
this);
368 __TModuleList::Add(
this);
388 __TModuleList::Add(
this);
407 __TModuleList::Add(
this);
416 if (ShouldFree && Handle > HINSTANCE(HINSTANCE_ERROR))
417 ::FreeLibrary(Handle);
422 __TModuleList::Remove(
this);
431 return __TModuleList::FindResModule(
id, type);
453 Name = (name.length() == 0 && Handle > HINSTANCE(HINSTANCE_ERROR)) ?
465#if !defined(BI_COMP_GNUC)
474#if defined(BI_COMP_GNUC)
481 while (*cmdLine && *cmdLine++ !=
_T(
' '))
490 if (!GetWindowPtrMsgId) {
491 const tchar msgTemplate[] =
_T(
"GetWindowPtr(%X)");
493 wsprintf(msgName, msgTemplate,
static_cast<uint>(
reinterpret_cast<UINT_PTR
>(hInstance)));
494 GetWindowPtrMsgId = ::RegisterWindowMessage(msgName);
495 CHECK(GetWindowPtrMsgId);
499#if !defined(BI_COMP_GNUC)
528 captionResId = IDS_UNHANDLEDXMSG;
530 LoadString(captionResId, cbuf, 80) ? cbuf :
nullptr,
532 (
LoadString(promptResId, pbuf, 80) ? pbuf :
_T(
"OK to Resume?"))
539struct TGetModuleFileName
542 TGetModuleFileName(
const TModule& m) : module(m) {}
544 int operator()(LPTSTR buf,
int buf_size)
const
546 int n =
module.GetModuleFileName(buf, buf_size);
547 WARN(n == buf_size,
_T(
"TModule::GetModuleFileName truncated the result."));
589 int resource =
::LoadString( GetInstance(),
id, buf, bufSize);
602 if(resHdl !=
nullptr){
604 if ((resData = (
TResText)LockResource(glbHdl)) !=
nullptr) {
607 for (cnt =
id % 16; len = *(
TResCount)resData++, cnt--; resData += len)
611 if (len >=
uint(bufSize))
613 wmemset(buf, 0, bufSize);
617 len = ::WideCharToMultiByte(CP_ACP, 0, resData, len, buf, bufSize,
nullptr,
nullptr);
623 FreeResource(glbHdl);
632 return module->LoadString(id, buf, bufSize);
651 char str[1024] =
"<empty>";
652 int res =
::LoadString( GetInstance(),
id, str,
sizeof str );
653 if( !res ) str[0] = 0;
665 if ((resData = (
TResText)LockResource(glbHdl)) != 0) {
667 for (cnt =
id % 16; len = *(
TResCount)resData++, cnt--; resData += len)
673 retString.append(resData, 0, len);
675 int n = ::WideCharToMultiByte(CP_ACP, 0, resData, len, 0, 0, 0, 0);
677 len = ::WideCharToMultiByte(CP_ACP, 0, resData, len, buf, n+1, 0, 0);
679 retString.resize(len+1);
681 for (i = 0; i < len; i++)
682 retString[i] =
static_cast<char>(buf[i]);
687 retString.resize(len);
689 for (i = 0; i < len; i++)
690 retString[i] =
static_cast<char>(buf[i]);
695 FreeResource(glbHdl);
722 if (resHdl !=
nullptr){
724 if ((resData = (
TResText)LockResource(glbHdl)) !=
nullptr) {
726 for (cnt =
id % 16; len = *(
TResCount)resData++, cnt--; resData += len)
731 retString.append(resData, 0, len);
735 retString.resize(len);
737 for (
int i = 0; i < len; i++)
738 retString[i] = resData[i];
740 int n = ::WideCharToMultiByte(CP_ACP, 0, resData, len,
nullptr, 0,
nullptr,
nullptr);
742 tchar* buf = __ClnObj;
743 len = ::WideCharToMultiByte(CP_ACP, 0, resData, len, buf, n+1,
nullptr,
nullptr);
745 retString.resize(len);
747 for (i = 0; i < len; i++)
748 retString[i] = buf[i];
761 return module->LoadString(id);
789 hBitmap = (HBITMAP)LockResource(glbHdl);
794 WARNX(OwlApp, !hBitmap, 0,
_T(
"Bitmap resource not found Id:") <<
id);
799 return module->LoadBitmap(id);
802 CHECKX(hBitmap,
_T(
"Bitmap resource not found even in module list."));
828 hAccel = (HACCEL)LockResource(glbHdl);
833 WARNX(OwlApp,!hAccel,0,
_T(
"Accelerator resource not found") <<
id);
838 return module->LoadAccelerators(id);
841 WARNX(OwlApp,!hAccel,0,
_T(
"Accelerator resource not found even in module list") <<
id);
867 hMenu = (HMENU)LockResource(glbHdl);
872 WARNX(OwlApp,!hMenu,0,
_T(
"Menu resource not found") <<
id);
877 return module->LoadMenu(id);
880 CHECKX(hMenu,
_T(
"Menu resource not found even in module list."));
905 hCursor = (HCURSOR)LockResource(glbHdl);
910 WARNX(OwlApp,!hCursor,0,
_T(
"Cursor resource not found") <<
id);
915 return module->LoadCursor(id);
918 CHECKX(hCursor,
_T(
"Cursor resource not found even in module list."));
946 hIcon = (HICON)LockResource(glbHdl);
951 WARNX(OwlApp,!hIcon,0,
_T(
"Icon resource not found") << name);
956 return module->LoadIcon(name);
959 CHECKX(hIcon,
_T(
"Icon resource not found even in module list"));
975 WARNX(OwlApp, !r, 0,
_T(
"HTML resource not found: ") <<
id);
981 CHECKX(module,
_T(
"HTML resource not found even in the module list."));
982 return module ? module->LoadHtml(id) : string();
985 const char* p =
static_cast<const char*
>(LockResource(g));
1000 if (!r)
throw TXOwl{
_T(
"TModule::GetClassInfo failed")};
1010 auto w = WNDCLASS{};
1023 Proc =
module.GetProcAddress(id);
1029 msg +=
module.GetName();
1039 static const tchar userStr[] =
_T(
"USER32");
1040# if defined(UNICODE)
1041 static const char LoadIconStr[] =
"LoadIconW";
1042 static const char GetClassInfoStr[] =
"GetClassInfoW";
1043 static const char GetMenuStringStr[]=
"GetMenuStringW";
1045 static const char LoadIconStr[] =
"LoadIconA";
1046 static const char GetClassInfoStr[] =
"GetClassInfoA";
1047 static const char GetMenuStringStr[]=
"GetMenuStringA";
1050static const char GetMenuStateStr[] =
"GetMenuState";
1051static const char DestroyIconStr[] =
"DestroyIcon";
1059 static TModule userModule(userStr, ::GetModuleHandle(userStr),
false);
1069 static TModuleProc2<HICON, HINSTANCE, LPCTSTR>
1071 return loadIcon(p1, p2);
1080 static TModuleProc1<BOOL, HICON> destroyIcon(
GetModule(), DestroyIconStr);
1081 return destroyIcon(p1);
1090 static TModuleProc3<BOOL, HINSTANCE, LPCTSTR, LPWNDCLASS>
1091 getClassInfo(
GetModule(), GetClassInfoStr);
1092 return getClassInfo(p1, p2, p3);
1101 static TModuleProc5<int, HMENU, uint, LPTSTR, int, int>
1102 getMenuString(
GetModule(), GetMenuStringStr);
1103 return getMenuString(p1, p2, p3, p4, p5);
1112 static TModuleProc3<UINT, HMENU, UINT, UINT>
1113 getMenuState(
GetModule(), GetMenuStateStr);
1114 return getMenuState(p1, p2, p3);
1119 static const tchar verStr[] =
_T(
"VERSION.DLL");
1120# if defined(UNICODE)
1121 static const char GetFileVersionInfoStr[] =
"GetFileVersionInfoW";
1122 static const char GetFileVersionInfoSizeStr[] =
"GetFileVersionInfoSizeW";
1123 static const char VerQueryValueStr[]=
"VerQueryValueW";
1124 static const char VerLanguageNameStr[] =
"VerLanguageNameW";
1126 static const char GetFileVersionInfoStr[] =
"GetFileVersionInfoA";
1127 static const char GetFileVersionInfoSizeStr[] =
"GetFileVersionInfoSizeA";
1128 static const char VerQueryValueStr[]=
"VerQueryValueA";
1129 static const char VerLanguageNameStr[] =
"VerLanguageNameA";
1138 static TModule verModule(verStr,
true,
true,
false);
1148 static TModuleProc4<BOOL,LPTSTR,DWORD,DWORD,LPVOID>
1149 getFileVersionInfo(
GetModule(), GetFileVersionInfoStr);
1150 return getFileVersionInfo(p1, p2, p3, p4);
1159 static TModuleProc2<DWORD,LPTSTR,LPDWORD>
1160 getFileVersionInfoSize(
GetModule(), GetFileVersionInfoSizeStr);
1161 return getFileVersionInfoSize(p1, p2);
1170 static TModuleProc4<BOOL,const LPVOID,LPTSTR,LPVOID,uint *>
1171 verQueryValue(
GetModule(), VerQueryValueStr);
1172 return verQueryValue(p1, p2, p3, p4);
1181 static TModuleProc3<DWORD,DWORD,LPTSTR,DWORD>
1182 verLanguageName(
GetModule(), VerLanguageNameStr);
1183 return verLanguageName(p1, p2, p3);
1190static const tchar oleStr[] =
_T(
"OLE32.DLL");
1191static const tchar oleAutStr[] =
_T(
"OLEAUT32.DLL");
1193static const char CoCreateInstanceStr[] =
"CoCreateInstance";
1194static const char SysFreeStringStr[] =
"SysFreeString";
1195static const char SysStringLenStr[] =
"SysStringLen";
1196static const char SysAllocStringStr[] =
"SysAllocString";
1204 static TModule oleModule(oleStr,
true,
true,
false);
1214 static TModuleProc5<HRESULT,REFCLSID, LPUNKNOWN, DWORD, REFIID, LPVOID*>
1215 coCreateInstance(
GetModule(), CoCreateInstanceStr);
1216 return coCreateInstance(p1, p2, p3, p4, p5);
1225 static TModule oleautoModule(oleAutStr,
true,
true,
false);
1226 return oleautoModule;
1235 static TModuleProc1<HRESULT,BSTR>
1236 sysFreeString(
GetModule(), SysFreeStringStr);
1237 return sysFreeString(p1);
1246 static TModuleProc1<UINT,BSTR>
1247 sysStringLen(
GetModule(), SysStringLenStr);
1248 return sysStringLen(p1);
1258 static TModuleProc1<BSTR,const OLECHAR *>
1259 sysAllocString(
GetModule(), SysAllocStringStr);
1260 return sysAllocString(p1);
1316#if OWL_PERSISTENT_STREAMS
1326 is >> o->ShouldFree;
1328 o->Handle = ::LoadLibrary(o->Name.c_str());
1337TModule::Streamer::Write(opstream& os)
const
1339 TModule* o = GetObject();
1341 os << o->ShouldFree;
1354#if defined(_BUILDOWLDLL)
1363 GetModuleFileName(hInstance, buffer,
_MAX_PATH);
1364 static TModule module(buffer, hInstance);
1366 TRACEX(OwlApp, 0,
"Global Module " << hInstance <<
", " << buffer <<
" created");
1375 HINSTANCE hInstance = ::GetModuleHandle(NULL);
1389 TObjectWindowsLibrary(HINSTANCE hInst) : TModule(
_T(
"ObjectWindowsDLL"), hInst){}
1396# if OWL_PERSISTENT_STREAMS
1411TObjectWindowsLibrary::Streamer::Write(
opstream&)
const
1422# if !defined(WINELIB)
1428# if !defined(BI_COMP_BORLANDC) && !defined(BI_COMP_GNUC)
1430int __cdecl xnew_handler(
size_t) {
throw std::bad_alloc();
return 0;}
1432static void init_new_handler(
void)
1434 _set_new_handler(&xnew_handler);
1440extern "C" BOOL WINAPI RawDllMain(HINSTANCE, DWORD dwReason, LPVOID);
1441# if defined(BI_COMP_BORLANDC)
1442extern "C" BOOL (WINAPI* _pRawDllMain)(HINSTANCE, DWORD, LPVOID) = RawDllMain;
1444extern "C" BOOL (WINAPI* _pRawDllMain)(HINSTANCE, DWORD, LPVOID);
1445BOOL (WINAPI* _pRawDllMain)(HINSTANCE, DWORD, LPVOID) = &RawDllMain;
1452BOOL WINAPI RawDllMain(HINSTANCE, DWORD dwReason, LPVOID)
1455 if (dwReason == DLL_PROCESS_ATTACH){
1463 if (::GetVersion() & 0x80000000){
1465 ::MessageBoxA(
nullptr,
1466 "This application or DLL can not be loaded "
1467 "on Windows 95 or on Windows 3.1. It takes advantage "
1468 "of Unicode features only available on Windows NT.",
1469 "OWL Runtime Module", MB_ICONSTOP|MB_OK);
1481 else if (dwReason == DLL_PROCESS_DETACH){
1491#if !defined(BI_COMP_BORLANDC)
1496DllMain(HINSTANCE hInstance, DWORD reason, LPVOID lpreserved)
1503 case DLL_PROCESS_ATTACH: {
1504#if !defined(BI_COMP_BORLANDC) && !defined(BI_COMP_GNUC)
1511 owl::Module =
new owl::TObjectWindowsLibrary(hInstance);
1515 case DLL_PROCESS_DETACH: {
1528#if defined(BI_COMP_MSC)
1529static void _OwlForceVectorDelete()
1551#if defined(BI_COMP_BORLANDC)
1563#pragma startup __initOWL 31
1570#pragma exit __termOWL 31
1573#elif defined(BI_COMP_MSC)
1575int __cdecl xnew_handler(
size_t) {
throw std::bad_alloc();
return 0;}
1577static void init_new_handler(
void)
1582 _set_new_handler(&xnew_handler);
1587#pragma warning(disable: 4073)
1588#pragma init_seg(lib)
1590static void __initOWL()
1597#if defined(BI_DBCS_SUPPORT)
1603void _cdecl __termOWL()
1608static char __initOWLS =
static_cast<char>(__initOWL(), atexit(&__termOWL));
1611#elif defined(BI_COMP_GNUC)
1617void _cdecl __termOWL()
1623static void __initOWL()
1633static char __initOWLS = (char)(__initOWL(),atexit(__termOWL));
1637#error Unknown compiler
1650 return os << static_cast<void*>(m.Handle);
ULONG DeInitAllocCheck(void)
int InitAllocCheck(eAllocCheckOutput eOutput, BOOL bSetUnhandledExeptionFilter, ULONG ulShowStackAtAlloc)
Definition of class TAppDictionary.
Definition of class TApplication.
#define WARNX(group, condition, level, message)
#define WARN(condition, message)
#define PRECONDITION(condition)
#define CHECKX(condition, message)
#define TRACEX(group, level, message)
Pointer to an array of type T.
TApplication * GetApplication(uint pid=0)
Looks up and returns the application associated with a given process ID.
Derived from TModule and TMsgThread and virtually derived from TEventHandler, TApplication acts as an...
static tstring & GetCmdLine()
Return the command line of the application.
TLangId GetLangId() const
Returns identifier of language used by application.
TFrameWindow * GetMainWindow()
Return the current main window.
Class wrapper for management of color values.
Simple encapsulation of the SetErrorMode call.
TFileTime is a class derived from the structure FILETIME.
Multiple Read, Single Write section.
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TModuleProc(const TModule &module, TNarrowResId id)
Constructs a Module entry object given a narrow Windows resource identifier.
FARPROC Proc
Derived template classes perform type-safe parameter passing on call.
static UINT SysStringLen(BSTR)
static TModule & GetModule()
static HRESULT SysFreeString(BSTR)
static BSTR SysAllocString(const OLECHAR *)
static HRESULT CoCreateInstance(REFCLSID, LPUNKNOWN, DWORD, REFIID, LPVOID *)
static TModule & GetModule()
TPointF is similar to TPoint, but uses floating variables rather than integers.
TPoint is a support class, derived from tagPOINT.
TPointL is similar to TPoint, but uses long rather than int variables.
Array of pointers of simple types.
TRect is a mathematical class derived from tagRect.
The tagSIZE struct is defined as.
TSystemTime is a class derived from the structure SYSTEMTIME.
TPtrArrayIterator< T, TTypedArray< T, T, TStandardAllocator > > Iterator
static BOOL DestroyIcon(HICON)
static UINT GetMenuState(HMENU, UINT, UINT)
static HICON LoadIcon(HINSTANCE, LPCTSTR)
static BOOL GetClassInfo(HINSTANCE, LPCTSTR, LPWNDCLASS)
static int GetMenuString(HMENU, UINT, TCHAR *, int, UINT)
static TModule & GetModule()
static DWORD VerLanguageName(DWORD, TCHAR *, DWORD)
static BOOL VerQueryValue(const LPVOID, TCHAR *, LPVOID, uint *)
static BOOL GetFileVersionInfo(TCHAR *, DWORD, DWORD, LPVOID)
static DWORD GetFileVersionInfoSize(TCHAR *, LPDWORD)
static TModule & GetModule()
Type-safe encapsulation of a Windows class name, a union between ATOM and LPCTSTR.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
int MessageBox(LPCTSTR text, LPCTSTR caption=0, uint flags=MB_OK) const
Displays a message in a modal pop-up dialog box.
Derived from xmsg, TXBase is the base class for ObjectWindows and ObjectComponents exception-handling...
A nested class, TXInvalidModule describes an exception that results from an invalid module.
TXOwl is root class of the ObjectWindows exception hierarchy.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Base class for writing streamable objects.
Definition of class TFrameWindow.
#define DECLARE_STREAMABLE(exp, cls, ver)
static void Raise(const tstring &msg, uint resId=0)
static tstring MakeMessage(uint resId, const tstring &infoStr, TModule *module=&GetGlobalModule())
TXOwl(const tstring &msg, uint resId=0)
An OWL exception with a given message for displaying and an unsigned Id that can be used for identifi...
auto GetString() const -> tstring
Returns the class name in string form.
void Throw()
Throws the exception.
TXInvalidModule(const tstring &name=tstring())
Creates the Invalid Module exception.
HACCEL LoadAccelerators(TResId id) const
Wrapper for the Windows API.
auto GetClassInfo(TWindowClassName, WNDCLASS *wndclass) const -> bool
Retrieves information about the given window class.
HCURSOR LoadCursor(TResId id) const
Wrapper for the Windows API.
HICON LoadIcon(TResId name) const
Wrapper for the Windows API.
int LoadString(uint id, TCHAR *buf, int maxChars) const
Loads a string resource identified by id into the buffer pointed to by buff.
HGLOBAL LoadResource(HRSRC hRsrc) const
Wrapper for the Windows API.
tstring GetModuleFileName() const
String-aware overload.
int GetModuleFileName(TCHAR *buff, int maxChars) const
Returns the expanded file name (path and file name) of the file from which this module was loaded.
HRSRC FindResource(TResId id, TResId type) const
Wrapper for the Windows API to find a particular resource.
TModule(const tstring &name, bool shouldLoad=true, bool mustLoad=true, bool addToList=true)
Constructs a TModule object that is used as an alias for a DLL.
virtual ~TModule()
Destructs a TModule, freeing the instance if appropriate, and deleting new'd strings.
void InitModule(THandle handle, const tstring &cmdLine)
Finish-up initialization of a module.
auto IsString() const -> bool
auto GetAtom() const -> ATOM
HINSTANCE THandle
TModule encapsulates an HINSTANCE.
static TModule * FindResModule(TResId id, TResId type)
Global search for resources.
auto GetPointerRepresentation() const -> LPCTSTR
HMENU LoadMenu(TResId id) const
Wrapper for the Windows API.
auto IsRegisteredClass(TWindowClassName) const -> bool
Returns true if the given window class has been registered.
uint32 SizeofResource(HRSRC hRsrc) const
Wrapper for the Windows API.
void SetHandle(THandle handle)
Set the module instance handle.
static void Raise(const tstring &name=tstring())
Throws the exception.
HRSRC FindResourceEx(TResId id, TResId type, TLangId langId=LangNeutral) const
Wrapper for the Windows API to find a particular resource.
static TModule * NextModule(TModule *module=nullptr)
void SetName(LPCTSTR name)
Accessor function that sets the name of the module.
std::string LoadHtml(TResId) const
Loads the given HTML resource and returns it as a narrow string.
TSystemMessage()
default errorId, def language
HBITMAP LoadBitmap(TResId id) const
Wrapper for the Windows API.
virtual int Error(TXBase &x, uint captionResId, uint promptResId=0)
Replaceable exception handler; may be redefined to process OWL exceptions if canResume is false,...
int MessageBox(TWindow *wnd, const tstring &msg, const tstring &title, uint flags=MB_OK) const
TXInvalidModule * Clone()
Creates a copy of the exception.
void Init(TLangId langId)
int WINAPI DllEntryPoint(HINSTANCE hInstance, uint32 reason, LPVOID)
Definition of class TModule.
Object Windows Library (OWLNext Core).
_OWLDATA(uint) GetWindowPtrMsgId
owl::opstream & operator<<(owl::opstream &os, const TColor &c)
Insert the color value into a persistent output stream.
owl::uint16 TLangId
Holds a language ID, a predefined number that represents a base language and dialect.
tstring CopyText(int size, TGetText get_text)
Copies text from a C-string (null-terminated character array) into a string object,...
const TLangId LangNeutral
TAppDictionary & OWLGetAppDictionary()
Global exported TAppDictionary in Owl.
int HandleGlobalException(owl::TXBase &x, LPCTSTR caption, LPCTSTR canResume=nullptr)
IMPLEMENT_STREAMABLE(TDocManager)
TResIdT< char > TNarrowResId
void InitGlobalModule(HINSTANCE hInstance)
TModule & GetGlobalModule()
IMPLEMENT_STREAMABLE1(TApplication, TModule)
DIAG_DECLARE_GROUP(OwlThread)
General definitions used by all ObjectWindows programs.
#define COUNTOF(s)
Array element count Important: Only use this with an argument of array type.
Various types of smart pointer templatized classes.
Definition of container classes used and made available by OWL.
Base window class TWindow definition, including HWND encapsulation.