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
wsyscls.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1992, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Classes for window system structure and type encapsulation
7//----------------------------------------------------------------------------
8
9#if !defined(OWL_WSYSCLS_H)
10#define OWL_WSYSCLS_H
11
12#include <owl/private/defs.h>
13#if defined(BI_HAS_PRAGMA_ONCE)
14# pragma once
15#endif
16
17#include <owl/geometry.h> // TPoint, et. al.
18#include <owl/pointer.h>
19
20#if !defined(BI_NOTEMPLATE_H)
21#include <owl/template.h>
22#endif
23
24#include <shellapi.h>
25#include <vector>
26#include <utility>
27
28namespace owl {class _OWLCLASS ipstream;};
29namespace owl {class _OWLCLASS opstream;};
30
31
32namespace owl {
33
34#include <owl/preclass.h>
35
36//
37/// \class TResIdT
38/// TResId encapsulates a Windows resource identifier.
39///
40/// A Windows resource identifier is a pointer which either stores a pointer to
41/// a string that identifies the resource, or a numerical identifier encoded as
42/// a WORD in the lower bits. If the latter, then the higher bits are 0.
43///
44/// This class does not take ownership of the actual string that the resource
45/// identifier may point to.
46//
47template <class T>
49{
50public:
51 typedef const T* TPointer;
52
53 //
54 /// Sets the identifier to 0.
55 //
56 TResIdT() : ResId(nullptr) {}
57
58 //
59 /// Encapsulates the given Windows resource identifier.
60 /// Note: The given pointer may actually encode a WORD in the lower bits.
61 //
62 TResIdT(TPointer id) : ResId(id) {}
63
64 //
65 /// Encapsulates the given numerical Windows resource identifier.
66 /// Note that a integer resource identifier is defined as a WORD, and
67 /// thus only supports the identifier range 0 to 65535.
68 //
70 PRECONDITION(id >= 0 && id <= 65535);
71 }
72
73 //
74 /// Returns the encapsulated pointer.
75 //
76 TPointer GetPointerRepresentation() const {return ResId;}
77
78 //
79 /// Returns true if this resource identifier encodes an integer value.
80 //
81 bool IsInt() const {return IS_INTRESOURCE(ResId);}
82
83 //
84 /// Returns true if this resource identifier encodes a string pointer.
85 //
86 bool IsString() const {return !IsInt();}
87
88 //
89 /// Returns the encapsulated numerical identifier, provided this resource
90 /// identifier encodes a numerical identifier.
91 //
92 WORD GetInt() const {
93 PRECONDITION(IsInt());
94 return static_cast<WORD>(reinterpret_cast<ULONG_PTR>(ResId) & 0x0FFFF);
95 }
96
97 //
98 /// Returns the encapsulated string pointer, provided this resource
99 /// identifier encodes a string pointer.
100 //
102 PRECONDITION(IsString());
103 return ResId;
104 }
105
106 private:
107 TPointer ResId;
108
109 //
110 /// Extracts a TResIdT object from is (the given input stream), and copies it to id.
111 /// Returns a reference to the resulting stream, allowing the usual chaining of >>
112 /// operations.
113 ///
114 /// NOTE: The caller is responsible for deallocating the memory if the returned TResId
115 /// represents a resource string, i.e. when id.IsString() == true.
116 //
118 {
119 bool isNumeric;
120 is >> isNumeric;
121
122 if (isNumeric)
123 {
124 long nid;
125 is >> nid;
126 id = TResIdT<T>(nid);
127 }
128 else
129 {
130 T* s = 0;
132 id = TResIdT<T>(s);
133 }
134 return is;
135 }
136
137 //
138 /// Inserts the given TResIdT object (id) into the opstream (os). Returns a reference
139 /// to the resulting stream, allowing the usual chaining of << operations.
140 //
142 {
143 bool isNumeric = id.IsInt();
144 os << isNumeric;
145
146 if (isNumeric)
147 {
148 long nid = id.GetInt();
149 os << nid;
150 }
151 else
152 {
153 TResIdT<T>::WriteString(os, id.GetString());
154 }
155 return os;
156 }
157
158 //
159 /// Formats and inserts the given TResId object (id) into the ostream (os). Returns
160 /// a reference to the resulting stream, allowing the usual chaining of <<
161 /// operations.
162 //
163 friend _OWLCFUNC(std::ostream&) operator <<(std::ostream& os, const TResIdT& id)
164 {
165 if (id.IsInt())
166 os << id.GetInt();
167 else
168 os << id.GetString();
169 return os;
170 }
171
172 //
173 // Helper functions for persistent streams
174 // Persistent streams only support narrow-character strings, so the persistent stream operators
175 // for TResIdT use overload resolution on these helpers to select the correct function,
176 // performing string conversion as necessary.
177 //
178
179 static void ReadString(ipstream& is, char*& s)
180 {s = is.freadString();}
181
182 static void ReadString(ipstream& is, wchar_t*& s)
183 {
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());
189 }
190
191 static void WriteString(opstream& os, const char* s)
192 {os.fwriteString(s);}
193
194 static void WriteString(opstream& os, const wchar_t* s)
195 {
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]);
201 }
202
203};
204
205class _OWLCLASS TResId : public TResIdT<tchar>
206{
207public:
210 TResId(int id) : TResIdT<tchar>(id) {}
211
212#if !defined(OWL_STRICT_DATA)
213
214#if defined(OWL5_COMPAT)
215 typedef LPTSTR TImplicitConversionResult;
216#else
218#endif
219
220 //
221 /// Typecasting operator that converts this to the pointer representation of
222 /// the encapsulated Windows resource identifier.
223 ///
224 /// This operator is deprecated. Use GetPointerRepresentation instead.
225 //
227 {return const_cast<TImplicitConversionResult>(GetPointerRepresentation());}
228
229#endif
230
231};
232
233#include <owl/posclass.h>
234
236
237} // OWL namespace
238//
239// MSW only classes
240//
241
242# if !defined(OWL_WSYSINC_H)
243# include <owl/wsysinc.h>
244# endif
245
246namespace owl {
247
248#include <owl/preclass.h>
249
250//
251/// \class TDropInfo
252// ~~~~~ ~~~~~~~~~
253/// TDropInfo is a simple class that supports file-name drag-and-drop operations
254/// using the WM_DROPFILES message. A TDropInfo object encapsulates a HDROP handle
255/// returned by the WM_DROPFILES message.
256//
258 public:
259 //
260 /// Creates a TDropInfo object encapsulating the given handle.
261 //
263
264 void DragFinish() const;
265
266 // Type Conversion operators
267 //
268 operator HDROP() {return Handle;}
269 operator HDROP() const {return Handle;}
270
271 // Information access
272 //
273 tstring DragQueryFile(uint index) const;
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;
279
280 private:
281 HDROP Handle;
282};
283
284//
285/// \class TFileDroplet
286// ~~~~~ ~~~~~~~~~
287/// TFileDroplet encapsulates information about a single dropped file, its name,
288/// where it was dropped, and whether or not it was in the client area.
289//
291{
292 public:
293 TFileDroplet(const tstring& fileName, const TPoint& p, bool inClient);
296
297/// Returns true if the address of this object is equal to the address of the
298/// compared object.
299 bool operator ==(const TFileDroplet& other) const {return &other == this;}
300
301/// Returns the name of the file dropped.
302 LPCTSTR GetName() const {return FileName;}
303
304/// Returns the cursor position at which the file was dropped.
305 TPoint GetPoint() const {return Point;}
306
307/// Returns true if the drop occurred in the client area.
308 bool GetInClientArea() const {return InClientArea;}
309
310 private:
311 LPTSTR FileName;
312 TPoint Point;
313 bool InClientArea;
314
315 // Hidden to prevent accidental copying or assignment
316 //
319};
320
321template <class T> class TIPtrArray;
322template <class T, class T1> class TPtrArrayIterator;
323
326
327//
328/// \class TProcInstance
329// ~~~~~ ~~~~~~~~~~~~~
330/// A ProcInstance object. This encapsulates the MakeProcInstance call, which is
331/// really only needed in old Win3.X real mode. This exists now for Owl 2.x
332/// compatibility only
333//
335 public:
336 TProcInstance(FARPROC p) {Instance = FARPROC(p);}
337
338 operator FARPROC() {return Instance;}
339
340 private:
341 FARPROC Instance;
342};
343
344
345
346//
347// FILETIME and SYSTEMTIME wrappers
348//
349class _OWLCLASS TSystemTime;
350class _OWLCLASS TTime;
351
352/// TFileTime is a class derived from the structure FILETIME.
353///
354/// The FILETIME struct is defined as
355/// \code
356/// struct tagFILETIME {
357/// uint32 dwLowDateTime;
358/// uint32 dwHighDateTime;
359/// } FILETIME;
360/// \endcode
361class _OWLCLASS TFileTime: public FILETIME
362{
363 public:
364 /// Constructs a empty TFileTime object.
366
367 TFileTime(const TSystemTime& tm);
368
369 /// Constructs a TFileTime object from given TFileTime.
370 TFileTime(const TFileTime& tm){memcpy(this, &tm, sizeof(tm));}
371
372 /// Constructs a TFileTime object from given FILETIME.
373 TFileTime(const FILETIME& tm){memcpy(this, &tm, sizeof(tm));}
374
375 TFileTime(const TTime& tm);
376
377 TFileTime& operator=(const TTime& tm);
378
379 bool ToLocalTime();
381 { return ::FileTimeToLocalFileTime(const_cast<TFileTime*>(this), &tm); }
382
383 bool ToUniversalTime();
385 { return ::LocalFileTimeToFileTime(this, &tm); }
386
387 // Boolean operators.
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;
394
395 // Read or write times on persistent streams
396 friend _OWLCFUNC(opstream &) operator << ( opstream & s, const TFileTime & d );
398};
399
400
401//
402/// \class TSystemTime
403// ~~~~~ ~~~~~~~~~~~
404/// TSystemTime is a class derived from the structure SYSTEMTIME.
405///
406/// The SYSTEMTIME struct is defined as
407/// \code
408/// typedef struct _SYSTEMTIME {
409/// WORD wYear;
410/// WORD wMonth;
411/// WORD wDayOfWeek;
412/// WORD wDay;
413/// WORD wHour;
414/// WORD wMinute;
415/// WORD wSecond;
416/// WORD wMilliseconds;
417/// } SYSTEMTIME;
418/// \endcode
419//
420class _OWLCLASS TSystemTime: public SYSTEMTIME {
421 public:
422 TSystemTime() { memset(this,0,sizeof(SYSTEMTIME)); }
423 TSystemTime(uint y, uint m, uint d, uint h=0, uint mn=0, uint s=0, uint dw=0,uint ms=0);
424 TSystemTime(const TSystemTime& tm) { memcpy(this, &tm, sizeof(tm)); }
426 TSystemTime(const SYSTEMTIME& tm) { memcpy(this, &tm, sizeof(tm)); }
427
428 //
429 /// Parses the given date and time string using the optional locale.
430 /// The user default locale is used if no locale is specified.
431 /// Throws an TXOwl exception if parsing fails.
432 //
433 TSystemTime(const tstring&, LCID = 0);
434
435 uint16 GetYear() { return wYear; }
436 uint16 GetYear() const { return wYear; }
437 void SetYear(uint y) { wYear = static_cast<uint16>(y); }
438
439 uint16 GetMonth() { return wMonth; }
440 uint16 GetMonth() const { return wMonth; }
441 void SetMonth(uint m) { wMonth = static_cast<uint16>(m); }
442
444 uint16 GetDayOfWeek() const { return wDayOfWeek; }
445 void SetDayOfWeek(uint dw) { wDayOfWeek = static_cast<int16>(dw); }
446
447 uint16 GetDay() { return wDay; }
448 uint16 GetDay() const { return wDay; }
449 void SetDay(uint d) { wDay = static_cast<uint16>(d); }
450
451 uint16 GetHour() { return wHour; }
452 uint16 GetHour() const { return wHour; }
453 void SetHour(uint h) { wHour = static_cast<uint16>(h); }
454
456 uint16 GetMinute() const { return wMinute; }
457 void SetMinute(uint m) { wMinute = static_cast<uint16>(m); }
458
460 uint16 GetSecond() const { return wSecond; }
461 void SetSecond(uint s) { wSecond = static_cast<uint16>(s); }
462
465 void SetMilliseconds(uint ms){ wMilliseconds = static_cast<uint16>(ms); }
466
467 TFileTime GetFileTime() { return TFileTime(*this);}
468 static TSystemTime LocalTime() { TSystemTime tm; ::GetLocalTime(&tm); return tm; }
469 static TSystemTime SystemTime() { TSystemTime tm; ::GetSystemTime(&tm); return tm; }
470
471 TSystemTime& operator=(const TFileTime& ft) { *this = TSystemTime(ft); return *this; }
472
473 // Boolean operators.
474 bool operator < ( const TSystemTime & t ) const;
475 bool operator <= ( const TSystemTime & t ) const;
476 bool operator > ( const TSystemTime & t ) const;
477 bool operator >= ( const TSystemTime & t ) const;
478 bool operator == ( const TSystemTime & t ) const;
479 bool operator != ( const TSystemTime & t ) const;
480
481};
482
483/// \class TResource
484//
485/// TResource simplifies access to a resource by encapsulating
486/// the find, load, lock and free steps for accessing a resource.
487/// - 'T' represents a structure which defines the binary layout of the resource.
488/// - 'resType' is a constant string that defines the resource type.
489//
490/// For example,
491/// \code
492/// typedef TResource<DLGTEMPLATE, (int)RT_DIALOG> TDlgResource;
493/// TDlgResource dlgInfo(hInstance, IDD_ABOUTDLG);
494/// DLGTEMPLATE* pDlgTmpl = dlgInfo;
495/// \endcode
496//
497//template <class T, const tchar * resType>
498template <class T, int resType> class /*_OWLCLASS*/ TResource {
499 public:
503 bool IsOK() const; ///< Confirms whether resource was found
504 operator T*(); ///< Conversion operator to point to structure representing binary layout of the resource...
505 DWORD GetSize() const; ///< Returns the size in bytes of the loaded resource
506
507 protected:
508 HGLOBAL MemHandle; ///< Handle of resource
509 T* MemPtr; ///< Pointer to locked resource
510
511 private:
512 DWORD Size;
513};
514
515#include <owl/posclass.h>
516
517//
518// inlines
519//
520inline bool TFileTime::operator < ( const TFileTime & t ) const{
521//JJH
522#ifdef __GNUC__
523 return ::CompareFileTime((FILETIME*) this, (FILETIME*) &t) < 0;
524#else
525 return ::CompareFileTime(this, &t) < 0;
526#endif
527}
528
529//
530inline bool TFileTime::operator <= ( const TFileTime & t ) const{
531 return !(*this > t);
532}
533
534//
535inline bool TFileTime::operator > ( const TFileTime & t ) const{
536//JJH
537#ifdef __GNUC__
538 return ::CompareFileTime(const_cast<TFileTime*>(this), const_cast<TFileTime*>(&t)) > 0;
539#else
540 return ::CompareFileTime(const_cast<TFileTime*>(this), const_cast<TFileTime*>(&t)) > 0;
541#endif
542}
543
544//
545inline bool TFileTime::operator >= ( const TFileTime & t ) const{
546 return !(*this < t);
547}
548
549//
550inline bool TFileTime::operator != ( const TFileTime & t ) const{
551 return !(*this == t);
552}
553
554//
555inline bool TFileTime::operator == ( const TFileTime & t ) const{
556//JJH
557#ifdef __GNUC__
558 return ::CompareFileTime((FILETIME*)this, (FILETIME*)&t) == 0;
559#else
560 return ::CompareFileTime(this, &t) == 0;
561#endif
562}
563
564//
565/// Constructs a TFileTime object from system time.
569
570//
572 uint s, uint dw, uint ms)
573{
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);
582}
583
584//
585inline bool TSystemTime::operator < ( const TSystemTime & t ) const{
586 return TFileTime(*this) < TFileTime(t);
587}
588
589//
590inline bool TSystemTime::operator <= ( const TSystemTime & t ) const{
591 return !(*this > t);
592}
593
594//
595inline bool TSystemTime::operator > ( const TSystemTime & t ) const{
596 return TFileTime(*this) > TFileTime(t);
597}
598
599//
600inline bool TSystemTime::operator >= ( const TSystemTime & t ) const{
601 return !(*this < t);
602}
603
604//
605inline bool TSystemTime::operator == ( const TSystemTime & t ) const{
606 return TFileTime(*this) == TFileTime(t);
607}
608
609//
610inline bool TSystemTime::operator != ( const TSystemTime & t ) const{
611 return !(*this == t);
612}
613
614//
615/// Loads & locks the specified resource..
616//
617//template <class T, const tchar * resType>
618template <class T, int resType>
620:
621 MemHandle(nullptr),
622 MemPtr(nullptr),
623 Size(0)
624{
625 HRSRC resHandle = FindResource(hModule, resId.GetPointerRepresentation(), reinterpret_cast<tchar *>(resType));
626 if (resHandle) {
627 Size = SizeofResource(hModule, resHandle);
628 MemHandle = LoadResource(hModule, resHandle);
629 if (MemHandle)
630 MemPtr = static_cast<T*>(LockResource(MemHandle));
631 }
632}
633
634//
635/// Loads & locks a resource of the type 'resType' from the module
636/// (hModule). Accepts a LanguageID for localized resources.
637//
638//template <class T, const tchar * resType>
639template <class T, int resType>
641:
642 MemHandle(nullptr),
643 MemPtr(nullptr),
644 Size(0)
645{
646 HRSRC resHandle = FindResourceEx(hModule, reinterpret_cast<tchar *>(resType), resId.GetPointerRepresentation(), lcid);
647 if (resHandle) {
648 Size = SizeofResource(hModule, resHandle);
649 MemHandle = LoadResource(hModule, resHandle);
650 if (MemHandle)
651 MemPtr = static_cast<T*>(LockResource(MemHandle));
652 }
653}
654
655//
656/// Unlocks and frees the resource loaded earlier.
657/// \note Unlocking and freeing of resources is not necessary in WIN32.
658//
659//template <class T, const tchar * resType>
660template <class T, int resType>
662{
663 // NOTE: UnlockResource and FreeResource are not necessary (albeit harmless)
664 // in 32-bit
665 //
666 MemHandle = nullptr;
667 MemPtr = nullptr;
668 Size = 0;
669}
670
671//
672/// Returns true if resource was successfully loaded or false otherwise.
673//
674//template <class T, const tchar * resType> bool
675template <class T, int resType> bool
677{
678 return ((MemHandle != nullptr) && (MemPtr != nullptr));
679}
680
681//
682/// Returns a pointer to the locked resource.
683/// \note This operator eliminates the need to explicitly cast
684/// LPVOID to a structure representing the actual layout
685/// of individual resource types.
686//
687//template <class T, const tchar * resType>
688template <class T, int resType>
690{
691 PRECONDITION(IsOK());
692 return MemPtr;
693}
694
695//
696/// Returns the size, in bytes, of the loaded resource.
697//
698//template <class T, const tchar * resType> DWORD
699template <class T, int resType> DWORD
701{
702 PRECONDITION(IsOK());
703 return Size;
704}
705
706
707
708} // OWL namespace
709
710
711
712#endif // OWL_WINCLASS_H
#define WARN(condition, message)
Definition checks.h:273
#define PRECONDITION(condition)
Definition checks.h:227
TDropInfo is a simple class that supports file-name drag-and-drop operations using the WM_DROPFILES m...
Definition wsyscls.h:257
TDropInfo(HDROP handle)
Creates a TDropInfo object encapsulating the given handle.
Definition wsyscls.h:262
TFileDroplet encapsulates information about a single dropped file, its name, where it was dropped,...
Definition wsyscls.h:291
LPCTSTR GetName() const
Returns the name of the file dropped.
Definition wsyscls.h:302
TPoint GetPoint() const
Returns the cursor position at which the file was dropped.
Definition wsyscls.h:305
bool GetInClientArea() const
Returns true if the drop occurred in the client area.
Definition wsyscls.h:308
TFileTime is a class derived from the structure FILETIME.
Definition wsyscls.h:362
bool operator>=(const TFileTime &t) const
Definition wsyscls.h:545
bool operator<(const TFileTime &t) const
Definition wsyscls.h:520
bool ToLocalTime(TFileTime &tm) const
Definition wsyscls.h:380
bool operator!=(const TFileTime &t) const
Definition wsyscls.h:550
bool operator>(const TFileTime &t) const
Definition wsyscls.h:535
bool operator==(const TFileTime &t) const
Definition wsyscls.h:555
bool operator<=(const TFileTime &t) const
Definition wsyscls.h:530
TFileTime(const TFileTime &tm)
Constructs a TFileTime object from given TFileTime.
Definition wsyscls.h:370
TFileTime()
Constructs a empty TFileTime object.
Definition wsyscls.h:365
bool ToUniversalTime(TFileTime &tm) const
Definition wsyscls.h:384
TFileTime(const FILETIME &tm)
Constructs a TFileTime object from given FILETIME.
Definition wsyscls.h:373
TPoint is a support class, derived from tagPOINT.
Definition geometry.h:87
Smart pointer to a single object. Provides member access operator ->
Definition pointer.h:73
A ProcInstance object.
Definition wsyscls.h:334
TProcInstance(FARPROC p)
Definition wsyscls.h:336
TResId(TPointer id)
Definition wsyscls.h:209
LPCTSTR TImplicitConversionResult
Definition wsyscls.h:217
TResId(int id)
Definition wsyscls.h:210
TResId encapsulates a Windows resource identifier.
Definition wsyscls.h:49
WORD GetInt() const
Returns the encapsulated numerical identifier, provided this resource identifier encodes a numerical ...
Definition wsyscls.h:92
TResIdT()
Sets the identifier to 0.
Definition wsyscls.h:56
TPointer GetString() const
Returns the encapsulated string pointer, provided this resource identifier encodes a string pointer.
Definition wsyscls.h:101
bool IsString() const
Returns true if this resource identifier encodes a string pointer.
Definition wsyscls.h:86
const T * TPointer
Definition wsyscls.h:51
TResIdT(TPointer id)
Encapsulates the given Windows resource identifier.
Definition wsyscls.h:62
bool IsInt() const
Returns true if this resource identifier encodes an integer value.
Definition wsyscls.h:81
TPointer GetPointerRepresentation() const
Returns the encapsulated pointer.
Definition wsyscls.h:76
TResIdT(int id)
Encapsulates the given numerical Windows resource identifier.
Definition wsyscls.h:69
TResource simplifies access to a resource by encapsulating the find, load, lock and free steps for ac...
Definition wsyscls.h:498
HGLOBAL MemHandle
Handle of resource.
Definition wsyscls.h:508
~TResource()
Unlocks and frees the resource loaded earlier.
Definition wsyscls.h:661
bool IsOK() const
Confirms whether resource was found.
Definition wsyscls.h:676
TResource(HINSTANCE hModule, TResId resId)
Loads & locks the specified resource..
Definition wsyscls.h:619
TResource(HINSTANCE hModule, TResId resid, LANGID langid)
Loads & locks a resource of the type 'resType' from the module (hModule).
Definition wsyscls.h:640
DWORD GetSize() const
Returns the size in bytes of the loaded resource.
Definition wsyscls.h:700
T * MemPtr
Pointer to locked resource.
Definition wsyscls.h:509
TSystemTime is a class derived from the structure SYSTEMTIME.
Definition wsyscls.h:420
void SetHour(uint h)
Definition wsyscls.h:453
void SetMonth(uint m)
Definition wsyscls.h:441
uint16 GetDay()
Definition wsyscls.h:447
TSystemTime(const TSystemTime &tm)
Definition wsyscls.h:424
uint16 GetHour() const
Definition wsyscls.h:452
uint16 GetDayOfWeek()
Definition wsyscls.h:443
uint16 GetDayOfWeek() const
Definition wsyscls.h:444
TSystemTime & operator=(const TFileTime &ft)
Definition wsyscls.h:471
uint16 GetSecond()
Definition wsyscls.h:459
uint16 GetSecond() const
Definition wsyscls.h:460
uint16 GetYear() const
Definition wsyscls.h:436
uint16 GetMilliseconds() const
Definition wsyscls.h:464
void SetYear(uint y)
Definition wsyscls.h:437
bool operator>=(const TSystemTime &t) const
Definition wsyscls.h:600
uint16 GetMonth()
Definition wsyscls.h:439
uint16 GetMinute() const
Definition wsyscls.h:456
static TSystemTime SystemTime()
Definition wsyscls.h:469
void SetMilliseconds(uint ms)
Definition wsyscls.h:465
bool operator==(const TSystemTime &t) const
Definition wsyscls.h:605
TFileTime GetFileTime()
Definition wsyscls.h:467
uint16 GetMinute()
Definition wsyscls.h:455
bool operator>(const TSystemTime &t) const
Definition wsyscls.h:595
void SetSecond(uint s)
Definition wsyscls.h:461
TSystemTime(const SYSTEMTIME &tm)
Definition wsyscls.h:426
uint16 GetHour()
Definition wsyscls.h:451
void SetMinute(uint m)
Definition wsyscls.h:457
bool operator<=(const TSystemTime &t) const
Definition wsyscls.h:590
static TSystemTime LocalTime()
Definition wsyscls.h:468
uint16 GetDay() const
Definition wsyscls.h:448
bool operator<(const TSystemTime &t) const
Definition wsyscls.h:585
TSystemTime(const TFileTime &tm)
Definition wsyscls.h:425
uint16 GetMonth() const
Definition wsyscls.h:440
uint16 GetMilliseconds()
Definition wsyscls.h:463
void SetDayOfWeek(uint dw)
Definition wsyscls.h:445
void SetDay(uint d)
Definition wsyscls.h:449
bool operator!=(const TSystemTime &t) const
Definition wsyscls.h:610
uint16 GetYear()
Definition wsyscls.h:435
The TTime class encapsulates time functions and characteristics.
Definition time.h:38
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Definition objstrm.h:391
Base class for writing streamable objects.
Definition objstrm.h:480
#define _T(x)
Definition cygwin.h:51
Classes for window system geometry.
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
TIPtrArray< TFileDroplet * > TFileDropletList
Definition wsyscls.h:324
char tchar
Definition defs.h:77
TPtrArrayIterator< TFileDroplet *, TFileDropletList > TFileDropletListIter
Definition wsyscls.h:325
std::string tstring
Definition defs.h:79
unsigned int uint
Definition number.h:25
TResIdT< char > TNarrowResId
Definition wsyscls.h:235
#define _OWLCFUNC(p)
Definition defs.h:342
#define _OWLCLASS
Definition defs.h:338
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.