9#if !defined(OWL_WSYSCLS_H)
13#if defined(BI_HAS_PRAGMA_ONCE)
20#if !defined(BI_NOTEMPLATE_H)
81 bool IsInt()
const {
return IS_INTRESOURCE(ResId);}
94 return static_cast<WORD
>(
reinterpret_cast<ULONG_PTR
>(ResId) & 0x0FFFF);
131 TResIdT<T>::ReadString(is, s);
143 bool isNumeric =
id.IsInt();
148 long nid =
id.GetInt();
153 TResIdT<T>::WriteString(os,
id.
GetString());
168 os <<
id.GetString();
179 static void ReadString(
ipstream& is,
char*& s)
182 static void ReadString(ipstream& is,
wchar_t*& s)
184 TAPointer<char> src(is.freadString());
185 int size = ::MultiByteToWideChar(CP_ACP, 0, src, -1,
nullptr, 0);
186 s =
new wchar_t[size];
187 int r = ::MultiByteToWideChar(CP_ACP, 0, src, -1, s, size);
188 WARN(r == 0,
_T(
"String conversion failed, GetLastError() == ") << GetLastError());
191 static void WriteString(opstream& os,
const char* s)
192 {os.fwriteString(s);}
194 static void WriteString(opstream& os,
const wchar_t* s)
196 int size = ::WideCharToMultiByte(CP_ACP, 0, s, -1,
nullptr, 0,
nullptr,
nullptr);
197 std::vector<char> dst(size);
198 int r = ::WideCharToMultiByte(CP_ACP, 0, s, -1, &dst[0], size,
nullptr,
nullptr);
199 WARN(r == 0,
_T(
"String conversion failed, GetLastError() == ") << GetLastError());
200 os.fwriteString(&dst[0]);
212#if !defined(OWL_STRICT_DATA)
214#if defined(OWL5_COMPAT)
215 typedef LPTSTR TImplicitConversionResult;
242# if !defined(OWL_WSYSINC_H)
264 void DragFinish()
const;
268 operator HDROP() {
return Handle;}
269 operator HDROP()
const {
return Handle;}
274 uint DragQueryFile(
uint index, LPTSTR name,
uint nameLen)
const;
275 uint DragQueryFileCount()
const;
276 uint DragQueryFileNameLen(
uint index)
const;
277 std::pair<TPoint, bool> DragQueryPoint()
const;
278 bool DragQueryPoint(
TPoint& point)
const;
299 bool operator ==(
const TFileDroplet& other)
const {
return &other ==
this;}
321template <
class T>
class TIPtrArray;
322template <
class T,
class T1>
class TPtrArrayIterator;
338 operator FARPROC() {
return Instance;}
373 TFileTime(
const FILETIME& tm){memcpy(
this, &tm,
sizeof(tm));}
381 { return ::FileTimeToLocalFileTime(
const_cast<TFileTime*
>(
this), &tm); }
383 bool ToUniversalTime();
385 { return ::LocalFileTimeToFileTime(
this, &tm); }
388 bool operator < (
const TFileTime & t )
const;
389 bool operator <= (
const TFileTime & t )
const;
390 bool operator > (
const TFileTime & t )
const;
391 bool operator >= (
const TFileTime & t )
const;
392 bool operator == (
const TFileTime & t )
const;
393 bool operator != (
const TFileTime & t )
const;
426 TSystemTime(
const SYSTEMTIME& tm) { memcpy(
this, &tm,
sizeof(tm)); }
523 return ::CompareFileTime((FILETIME*)
this, (FILETIME*) &t) < 0;
525 return ::CompareFileTime(
this, &t) < 0;
538 return ::CompareFileTime(
const_cast<TFileTime*
>(
this),
const_cast<TFileTime*
>(&t)) > 0;
540 return ::CompareFileTime(
const_cast<TFileTime*
>(
this),
const_cast<TFileTime*
>(&t)) > 0;
551 return !(*
this == t);
558 return ::CompareFileTime((FILETIME*)
this, (FILETIME*)&t) == 0;
560 return ::CompareFileTime(
this, &t) == 0;
567 ::SystemTimeToFileTime(&tm,
this);
574 wYear=
static_cast<uint16>(y);
575 wMonth=
static_cast<uint16>(m);
576 wDay=
static_cast<uint16>(d);
577 wHour=
static_cast<uint16>(h);
578 wMinute=
static_cast<uint16>(mn);
579 wSecond=
static_cast<uint16>(s);
580 wDayOfWeek=
static_cast<uint16>(dw);
581 wMilliseconds=
static_cast<uint16>(ms);
611 return !(*
this == t);
618template <
class T,
int resType>
627 Size = SizeofResource(hModule, resHandle);
628 MemHandle = LoadResource(hModule, resHandle);
639template <
class T,
int resType>
648 Size = SizeofResource(hModule, resHandle);
649 MemHandle = LoadResource(hModule, resHandle);
660template <
class T,
int resType>
675template <
class T,
int resType>
bool
688template <
class T,
int resType>
699template <
class T,
int resType> DWORD
#define WARN(condition, message)
#define PRECONDITION(condition)
TDropInfo is a simple class that supports file-name drag-and-drop operations using the WM_DROPFILES m...
TDropInfo(HDROP handle)
Creates a TDropInfo object encapsulating the given handle.
TFileDroplet encapsulates information about a single dropped file, its name, where it was dropped,...
LPCTSTR GetName() const
Returns the name of the file dropped.
TPoint GetPoint() const
Returns the cursor position at which the file was dropped.
bool GetInClientArea() const
Returns true if the drop occurred in the client area.
TFileDroplet(const tstring &fileName, const TPoint &p, bool inClient)
Supports drag and drop.
TFileTime is a class derived from the structure FILETIME.
bool operator>=(const TFileTime &t) const
bool operator<(const TFileTime &t) const
bool ToLocalTime(TFileTime &tm) const
bool operator!=(const TFileTime &t) const
bool operator>(const TFileTime &t) const
bool operator==(const TFileTime &t) const
bool operator<=(const TFileTime &t) const
TFileTime(const TFileTime &tm)
Constructs a TFileTime object from given TFileTime.
TFileTime()
Constructs a empty TFileTime object.
bool ToUniversalTime(TFileTime &tm) const
TFileTime(const FILETIME &tm)
Constructs a TFileTime object from given FILETIME.
TPoint is a support class, derived from tagPOINT.
Smart pointer to a single object. Provides member access operator ->.
Iterator for Pointer Container.
LPCTSTR TImplicitConversionResult
TResId encapsulates a Windows resource identifier.
WORD GetInt() const
Returns the encapsulated numerical identifier, provided this resource identifier encodes a numerical ...
TResIdT()
Sets the identifier to 0.
TPointer GetString() const
Returns the encapsulated string pointer, provided this resource identifier encodes a string pointer.
bool IsString() const
Returns true if this resource identifier encodes a string pointer.
TResIdT(TPointer id)
Encapsulates the given Windows resource identifier.
bool IsInt() const
Returns true if this resource identifier encodes an integer value.
TPointer GetPointerRepresentation() const
Returns the encapsulated pointer.
TResIdT(int id)
Encapsulates the given numerical Windows resource identifier.
HGLOBAL MemHandle
Handle of resource.
~TResource()
Unlocks and frees the resource loaded earlier.
bool IsOK() const
Confirms whether resource was found.
TResource(HINSTANCE hModule, TResId resId)
Loads & locks the specified resource..
DWORD GetSize() const
Returns the size in bytes of the loaded resource.
T * MemPtr
Pointer to locked resource.
TSystemTime is a class derived from the structure SYSTEMTIME.
TSystemTime(const TSystemTime &tm)
uint16 GetDayOfWeek() const
TSystemTime & operator=(const TFileTime &ft)
uint16 GetMilliseconds() const
bool operator>=(const TSystemTime &t) const
static TSystemTime SystemTime()
void SetMilliseconds(uint ms)
bool operator==(const TSystemTime &t) const
bool operator>(const TSystemTime &t) const
TSystemTime(const SYSTEMTIME &tm)
bool operator<=(const TSystemTime &t) const
static TSystemTime LocalTime()
bool operator<(const TSystemTime &t) const
TSystemTime(const TFileTime &tm)
void SetDayOfWeek(uint dw)
bool operator!=(const TSystemTime &t) const
The TTime class encapsulates time functions and characteristics.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
char * freadString()
Reads a string from the stream.
Base class for writing streamable objects.
Classes for window system geometry.
Object Windows Library (OWLNext Core).
TIPtrArray< TFileDroplet * > TFileDropletList
TPtrArrayIterator< TFileDroplet *, TFileDropletList > TFileDropletListIter
TResIdT< char > TNarrowResId
Various types of smart pointer templatized classes.
Definition of container classes used and made available by OWL.
Includes windowing system headers, with necessary macros defined.