20namespace {
char dummy[] =
"Not empty!"; }
22#if OWL_PERSISTENT_STREAMS
26const int StreamIsTop = 1;
27const int StreamIsTopChild = 2;
38 if (flags & StreamIsTop) {
47 o->TransferBuffer = 0;
50 o->ContextPopupMenu = 0;
56 o->Title =
const_cast<LPTSTR
>(
static_cast<LPCTSTR
>(TempId));
60 o->DefaultProc = (WNDPROC)::DefWindowProc;
61 memset(&o->Attr, 0,
sizeof(o->Attr));
65 UINT_PTR p =
reinterpret_cast<UINT_PTR
>(o->Attr.Param);
66 is >> o->Attr.Style >> o->Attr.ExStyle
67 >> o->Attr.X >> o->Attr.Y >> o->Attr.W >> o->Attr.H >> p;
68 o->Attr.Param =
reinterpret_cast<LPVOID
>(p);
69 o->DefaultProc = ::DefWindowProc;
83 o->Application = o->Parent->GetApplication();
88 if (flags & StreamIsTopChild)
89 o->Parent->ChildList = o;
95 o->Parent->AddChild(o);
97 static bool readSiblings =
true;
98 bool saveReadSiblings = readSiblings;
101 readSiblings = saveReadSiblings;
104 readSiblings =
false;
106 unsigned numSiblings;
108 for (
unsigned i = 0; i < numSiblings; i++) {
124 o->Scroller->SetWindow(o);
130 o->CursorModule =
nullptr;
134 is >> cursorModule >> cursorResId;
138 o->InstanceProc = o->CreateInstanceProc();
147TWindow::Streamer::Write(
opstream& os)
const
154 flags |= StreamIsTop;
155 else if (o->Parent) {
157 && o->Parent->ChildList == o)
158 flags |= StreamIsTopChild;
162 if (flags & StreamIsTop)
168 uint32 saveFlags = o->Flags;
174 uint32 saveStyle = o->Attr.Style &
175 ~(WS_MINIMIZE | WS_MAXIMIZE | WS_DISABLED | WS_VISIBLE);
178 saveStyle |= o->GetWindowLong(GWL_STYLE) &
179 (WS_MINIMIZE | WS_MAXIMIZE | WS_DISABLED | WS_VISIBLE);
181 const UINT_PTR p =
reinterpret_cast<UINT_PTR
>(o->Attr.Param);
182 os << saveStyle << o->Attr.ExStyle
183 << o->Attr.X << o->Attr.Y << o->Attr.W << o->Attr.H << p;
188 << o->Attr.AccelTable;
196 os << o->SiblingList;
200 static bool writeSiblings =
true;
201 bool saveWriteSiblings = writeSiblings;
202 writeSiblings =
true;
204 writeSiblings = saveWriteSiblings;
207 writeSiblings =
false;
209 os << (o->Parent->NumChildren()-1);
210 for (
TWindow* sibling = o->SiblingList; sibling != o; sibling = sibling->
Next())
212 writeSiblings =
true;
220 os << o->CursorModule << o->CursorResId;
Definition of class TAppDictionary.
Definition of class TApplication.
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...
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
TWindow * Next()
Returns a pointer to the next sibling window in the window's sibling list.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Base class for writing streamable objects.
@ wfFromResource
Handle comes from HWND created from resource.
@ wfMainWindow
This frame window is the main window.
@ wfStreamTop
This window is the topmost one to stream.
@ wfAutoCreate
Create the HWND when our parent is created.
Object Windows Library (OWLNext Core).
TAppDictionary & OWLGetAppDictionary()
Global exported TAppDictionary in Owl.
IMPLEMENT_STREAMABLE(TDocManager)
auto InternStreamedResId_(TResId id) -> TResId
#define TYPESAFE_DOWNCAST(object, toClass)
Private helper for reading resource identifiers from persistent streams.
Base window class TWindow definition, including HWND encapsulation.