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
oleframe.cpp
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectComponents
3// Copyright (c) 1994, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Implementation of class TOleFrame.
7//----------------------------------------------------------------------------
8#include <ocf/pch.h>
9
10#include <owl/decmdifr.h>
11#include <owl/statusba.h>
12#include <ocf/ocfevent.h>
13#include <ocf/oleframe.h>
14#include <ocf/olewindo.h>
15#include <owl/commctrl.h>
16
17namespace ocf {
18
19using namespace owl;
20
21using namespace std;
22
24//DIAG_DECLARE_GROUP(OwlCmd);
26
27//#define DEBUG_PADS
28// define to make pads paint red for debugging time in MS for idle action polling
29const int DllIdleTime = 200;
30
31// Four edge locations for inplace-server space negotiation
32//
39
40//----------------------------------------------------------------------------
41/// An empty no-erase window that inserts itself into its decorated frame
42/// parent
43//
44
45class TPadWindow : public TWindow {
46 public:
47 TPadWindow(TWindow* parent, int edge, TModule* module = 0)
48 : TWindow(parent, 0, module)
49 {
50 Attr.Id = IDW_PADDECORATION+edge;
51 Attr.Style = WS_CHILD | WS_VISIBLE;
52 Attr.W = Attr.H = 1; // takeup no space until needed
53 // need 1 since layout overlapps borders
54#if defined(DEBUG_PADS)
55 SetBkgndColor(TColor(255,0,0)); // to help Debug toolbar negotiations
56 strstream s;
57 s << _T("Pad") << (_T('0') + edge);
58 Title = strnewdup(s.str());
59#else
60 SetBkgndColor(NoErase); // Don't erase--to avoid flicker
61#endif
62 }
63};
64
65//
66/// \class TRemViewBucket
67// ~~~~~ ~~~~~~~~~~~~~~
68/// A small window class to act as a holder for the unattached remote server
69/// view windows
70//
71class TRemViewBucket : public TFrameWindow {
72 public:
73 TRemViewBucket(TWindow* parent);
74
75 // Overriden virtuals of base class
76 //
77 bool SetDocTitle(LPCTSTR, int);
78
79 // Override handlers to act as pass-thru on behalf of remove server view
80 //
81 TResult EvCommand(uint id, THandle hWndCtl, uint notifyCode);
82 TResult EvNotify(uint id, TNotify & notifyInfo);
83 void EvCommandEnable(TCommandEnabler& ce);
84 TWindow* FindRemoteWindow();
85};
86
87//
88//
89//
90TRemViewBucket::TRemViewBucket(TWindow* parent)
91 :TFrameWindow(parent, _T("RemViewBucket"))
92{
93 Attr.Style = WS_CHILD | WS_DISABLED;
94 Attr.Id = IDW_REMVIEWBUCKET;
95}
96
97//
98//
99//
100bool
101TRemViewBucket::SetDocTitle(LPCTSTR, int)
102{
103 return true;
104}
105
106//
107//
108//
109TWindow*
110TRemViewBucket::FindRemoteWindow()
111{
112 // Check if we can find the object representing the remote window object by
113 // traversing the focus window tree
114 //
115 TWindow* remote = 0;
116 HWND focusHwnd = GetFocus();
118 while (hwnd) {
120 if (remote) {
121 // The remote window has the remViewBucket as its parent
122 //
123 if (remote->GetParentO() == this)
124 break;
125 else
126 remote = 0;
127 }
128 hwnd = ::GetParent(hwnd);
129 }
130 return remote;
131}
132
133//
134//
135//
137TRemViewBucket::EvCommand(uint id, THandle hWndCtl, uint notifyCode)
138{
139 // Find remote view
140 //
141 TWindow* handler = FindRemoteWindow();
142
143 // Default to parent if none was found
144 //
145 if (!handler)
146 handler = GetParentO();
147
148 // Forward event
149 //
150 CHECK(handler);
151 return handler->EvCommand(id, hWndCtl, notifyCode);
152}
153
154//
155//
156//
158TRemViewBucket::EvNotify(uint id, TNotify & notifyInfo)
159{
160 // Find remote view
161 //
162 TWindow* handler = FindRemoteWindow();
163
164 // Default to parent if none was found
165 //
166 if (!handler)
167 handler = GetParentO();
168
169 // Forward event
170 //
171 CHECK(handler);
172 return handler->EvNotify(id, notifyInfo);
173}
174
175//
176//
177//
178void
179TRemViewBucket::EvCommandEnable(TCommandEnabler& ce)
180{
181 // Find remote view
182 //
183 TWindow* handler = FindRemoteWindow();
184
185 // Default to parent if none was found
186 //
187 if (!handler)
188 handler = GetParentO();
189
190 // Forward event
191 //
192 CHECK(handler);
193 handler->EvCommandEnable(ce);
194}
195
200
212
213//
214/// Constructs a TOleFrame object with the specified caption for the frame window
215/// (title), the client window (clientWnd), and module instance. The
216/// trackMenuSelection parameter indicates whether or not the frame window should
217/// track menu selections (that is, display hint text in the status bar of the
218/// window when a menu item is highlighted).
219//
223 TModule* module)
224:
226 TFrameWindow(0, title, clientWnd, false, module),
227 TWindow(0, title, module),
228 HOldMenu(0),
229 OcApp(0),
230 StashCount(0),
231 OcShutDown(DontCare)
232{
233 new TRemViewBucket(this); // Construct bucket to hold hidden server windows
234
235 // Retrieve the OcApp ptr from our owning application if it is a TOcAppHost
236 //
237 TOcAppHost* ocm = TYPESAFE_DOWNCAST(GetApplication(), TOcAppHost);
238 if (ocm)
239 SetOcApp(ocm->OcApp);
240}
241
242//
243/// Destroys a TOleFrame object.
244//
245/// Let the OC app go. It will delete itself when it can
246//
247TOleFrame::~TOleFrame()
248{
249}
250
251//
252/// Initial set of OcApp being passed to us to use.
253//
254/// Sets the ObjectComponents application associated with this frame window to the
255/// applications specified in the app parameter.
256//
257void
258TOleFrame::SetOcApp(TOcApp* ocApp)
259{
261 OcApp = ocApp;
262
263 // Initialize OLE 2 clipboard format names
264 //
265 TCHAR f[] = _T("%s");
266 AddUserFormatName(f, f, ocrEmbedSource);
267 AddUserFormatName(f, f, ocrEmbeddedObject);
268 AddUserFormatName(f, f, ocrLinkSource);
269}
270
271//
272/// Associates the ObjectComponents application with the window's HWND so that the
273/// TOcApp and the window can communicate. Prepares a place to insert the server's
274/// toolbars when in-place editing of the embedded object occurs.
275//
276void
277TOleFrame::SetupWindow()
278{
279 PRECONDITION(OcApp);
280 TDecoratedFrame::SetupWindow();
281 OcApp->SetupWindow(GetHandle());
282
283 // Insert the four pad windows for in-place server toolbars. Inserting last
284 // will place them as the inner-most decorations, which is needed with the
285 // status bar
286 //
287 for (int edge = 0; edge < 4; edge++)
288 Insert(*new TPadWindow(this, edge), ::ocf:: SpaceLoc[edge]);
289
290 // Create a timer to allow us to poll for idle time when we are a dll server
291 //
292 if (!OcApp->IsOptionSet(amExeMode))
293 SetTimer(IDT_DLLIDLE, DllIdleTime);
294}
295
296//
297/// Performs normal window cleanup of any HWND-related resources. For DLL servers,
298/// CleanupWindow destroys the idle timer.
299//
300void
301TOleFrame::CleanupWindow()
302{
303 if (!OcApp->IsOptionSet(amExeMode))
304 KillTimer(IDT_DLLIDLE);
305}
306
307//
308/// Adds user defined formats and the corresponding names to the list of Clipboard
309/// formats. Use this function if you want to associate a Clipboard data format
310/// (name) with the description of the data format as it appears to users in the
311/// Help text of the Paste Special dialog box (resultName). To use a standard
312/// Clipboard format, set the id parameter to an appropriate constant (for example,
313/// CF_TEXT). Otherwise, if the format is identified by a string, pass the string as
314/// the name and omit the ID.
315//
316void
317TOleFrame::AddUserFormatName(LPCTSTR name, LPCTSTR resultName,
318 LPCTSTR id)
319{
320 PRECONDITION(OcApp);
321 OcApp->AddUserFormatName(name, resultName, id);
322}
323
324//
325/// Sets the OcShutDown data member to ViewInitiated (if close is true and
326/// OcShutDown = DontCare) or DontCare (if close if false and OcShutDown =
327/// ViewInitiated.
328//
329void
330TOleFrame::OleViewClosing(bool close)
331{
332 if (close && OcShutDown == DontCare) {
333 OcShutDown = ViewInitiated;
334 }
335 else if (!close && OcShutDown == ViewInitiated) {
336 OcShutDown = DontCare;
337 }
338}
339
340namespace {
341
342/// Disconnect document servers with their clients.
343/// Document servers can be documents with objects copied on the clipboard or
344/// documents brought up though linking.
345//
347{
348 for (auto& child : win.GetChildren())
350
352 if (oleWin)
353 oleWin->OleShutDown();
354}
355
356} // namespace
357
358//
359/// Checks with all the connected servers to ensure that they can close before
360/// destroying the frame window. If the user closes the application with objects
361/// still embedded, Destroy hides the frame window instead of destroying it.
362//
363void
364TOleFrame::Destroy(int retVal)
365{
366 if (!GetHandle() || OcShutDown == UserInitiated)
367 return;
368
369 // Disconnect document servers with their clients if user shuts down the app
370 //
371 if (OcShutDown == DontCare) {
372 OcShutDown = UserInitiated;
373 for (auto& child : GetChildren())
375 }
376
377 if (!OcApp->CanClose()) {
378 OcApp->SetOption(amEmbedding, true);
379 OcShutDown = DontCare; // reset the shutdown flag
380 ShowWindow(SW_HIDE);
381 }
382 else {
383 bool dllServer = !OcApp->IsOptionSet(amExeMode);
384
385 TDecoratedFrame::Destroy(retVal);
386
387 // If user shuts down the DLL server (as in the case of open-editing,
388 // we need to set the mainwindow flag to 0 so that only the application
389 // will be destroyed. All windows are destroyed in previous calls.
390 //
391 if (dllServer && OcShutDown != ServerInitiated) {
392// GetApplication()->SetMainWindow(0);
393 GetApplication()->ClearMainWindow();
394 delete GetApplication();
395 }
396 }
397}
398
399//
400/// Passes a WM_SIZE message to TLayoutWindow.
401//
402/// Responds to an EV_WM_SIZE message indicating a change in the frame window's size
403/// and forwards this information to the TOcApp, which then notifies any in-place
404/// server. The server uses this information to change the size of its toolbar, if
405/// necessary.
406//
407void
408TOleFrame::EvSize(uint sizeType, const TSize& size)
409{
410 TDecoratedFrame::EvSize(sizeType, size);
411 if (OcApp)
412 OcApp->EvResize();
413}
414
415//
416/// Responds to a EV_WM_ACTIVATEAPP message sent when a window is activated or
417/// deactivated. If active is true, the window is being activated.
418/// This message is sent to the top-level window being deactivated before it is sent
419/// to the top-level window being activated. hTask is a handle to the current
420/// process.
421/// This event is forwarded to the TOcApp object, which activates an in-place server
422/// if one exists.
423//
424void
425TOleFrame::EvActivateApp(bool active, DWORD threadId)
426{
427 OcApp->EvActivate(active);
428 TDecoratedFrame::EvActivateApp(active, threadId);
429}
430
431//
432/// If this is a DLL server, EvTimer responds to a timer message by running an idle
433/// loop if the message queue is empty.
434//
435void
436TOleFrame::EvTimer(uint timerId)
437{
438 if (timerId == IDT_DLLIDLE)
439 GetApplication()->PostDispatchAction();
440 TWindow::EvTimer(timerId);
441}
442
443//
444/// Responds to a WM_OCEVENT message and subdispatches it to one of the EvOcXxxx
445/// event-handling functions based on the value of wParam. WM_OCEVENT messages are
446/// sent by ObjectComponents when it needs to communicate with an OLE-generated
447/// event; for example, if a server wants to display toolbars.
448//
450TOleFrame::EvOcEvent(TParam1 param1, TParam2 param2)
451{
453
454 // Give the client window the first chance at it
455 //
456 TWindow* receiver = GetClientWindow();
457 if (receiver->Find(eventInfo))
458 return receiver->Dispatch(eventInfo, param1, param2);
459
460 // Then try this frame
461 //
462 if (Find(eventInfo))
463 return Dispatch(eventInfo, param1, param2);
464
465 // Last, try the application in case it wants to override events
466 //
467 if (GetApplication()->Find(eventInfo))
468 return GetApplication()->Dispatch(eventInfo, param1, param2);
469 return 0;
470}
471
472//
473/// Responds to an EV_OC_APPINSMENUS message by merging the container's menu into
474/// the shared menu. The sharedMenu parameter refers to this merged menu.
475//
476bool
477TOleFrame::EvOcAppInsMenus(TOcMenuDescr & sharedMenu)
478{
479 if (HOldMenu) {
480 TRACEX(OcfOleMenu, 0, _T("EvOcAppInsMenus called while HOldMenu is ") << hex <<
481 static_cast<void*>(HOldMenu));
482 return true;
483 }
484
485 // Recreate a temporary composite menu for frame
486 //
487 TMenuDescr compMenuDesc; // empty menudescr
488 if (GetMenuDescr()) {
489 compMenuDesc.Merge(*GetMenuDescr());
490
491 // Mask off the server menus
492 //
493 compMenuDesc.Merge(TMenuDescr(0, 0, -1, 0, -1, 0, -1));
494 }
495 else
496 return false; // stop menu negotiation if we don't have menu
497
498 // Merge into the OLE shared menubar
499 //
501 sharedMenu.Width[0],
502 sharedMenu.Width[1],
503 sharedMenu.Width[2],
504 sharedMenu.Width[3],
505 sharedMenu.Width[4],
506 sharedMenu.Width[5]);
508
509 // Copy the shared menu widths back to the OC struct
510 //
511 for (int i = 0; i < 6; i++)
512 sharedMenu.Width[i] = shMenuDescr.GetGroupCount(i);
513
514 // Save the container popups so they can be destroyed later
515 //
516 StashContainerPopups(shMenuDescr);
517
518 TRACEX(OcfOleMenu, 0, _T("Merged menu ") << hex << static_cast<void*>(sharedMenu.HMenu));
519 return true;
520}
521
522//
523/// Responds to an OC_OCAPPMENUS sent to the container. The response is to install a
524/// merged menu bar.
525//
526bool
527TOleFrame::EvOcAppMenus(TOcMenuDescr & appMenus)
528{
529 if (!appMenus.HMenu) {
530 if (HOldMenu) {
531 TRACEX(OcfOleMenu, 0, _T("EvOcAppMenus(0) resetting Old ") << hex <<
532 static_cast<void*>(HOldMenu));
533 TMenu oleMenu(GetHandle());
534 SetMenu(HOldMenu); // assumes we are just restoring the old owl menu
535 HOldMenu = 0;
536 }
537 DestroyStashedPopups(); // destroy the popup copies we made
538 return true;
539 }
540
541 // Don't set the menu again if we are holding a merged one already
542 //
543 if (HOldMenu) {
544 TRACEX(OcfOleMenu, 0, _T("EvOcAppMenus called while HOldMenu is ") << hex <<
545 static_cast<void*>(HOldMenu));
546 return true;
547 }
548
549 HOldMenu = GetMenu();
550 TRACEX(OcfOleMenu, 0, _T("Saved Old ") << hex << static_cast<void*>(HOldMenu));
551
552 SetMenu(appMenus.HMenu);
553 TRACEX(OcfOleMenu, 0, _T("Set merged ") << hex << static_cast<void*>(appMenus.HMenu));
554
555 return true;
556}
557
558//
559/// Responds to an EV_OC_APPROCESSMSG message sent to the container asking the server
560/// to process accelerators and other messages from the container's message queue.
561//
562bool
563TOleFrame::EvOcAppProcessMsg(MSG * msg)
564{
565 return GetApplication()->ProcessAppMsg(*msg);
566}
567
568//
569/// Responds to an OC_APPFRAMERECT message sent to a container. The response is to
570/// get the coordinates of the client area rectangle of the application's main window.
571//
572bool
573TOleFrame::EvOcAppFrameRect(TRect * rect)
574{
576 *rect = GetClientRect();
577 TWindow* sb = ChildWithId(IDW_STATUSBAR);
578 if (sb) {
579 TRect sbr = sb->GetClientRect();
580 rect->bottom -= sbr.bottom+1;
581 }
582 return true;
583}
584
585//
586/// Responds to an OC_APPBORDERSPACEREQ message sent to a container. The response is
587/// to ask the container if it can give border space in its frame window to the
588/// server.
589//
590bool
591TOleFrame::EvOcAppBorderSpaceReq(TRect * /*space*/)
592{
593 return true;
594}
595
596//
597/// Responds to an OC_APPBORDERSPACESET message by making room in the container's
598/// frame window for the border space that the server has requested.
599//
600bool
601TOleFrame::EvOcAppBorderSpaceSet(TRect * space)
602{
603 // Resize pad decorations based on edges requested
604 //
605 int* edges = (int*)space; // treat space as array of 4 int edges
606 bool needLayout = false;
607 for (int i = 0; i < 4; i++) {
608 TWindow* pad = ChildWithId(IDW_PADDECORATION+i);
609 if (pad) {
610 int edge = edges && edges[i] ? edges[i]+1 : 1;
611 if ((i%2 == 0 && pad->GetWindowAttr().W != edge) || // left & right edge
612 (i%2 == 1 && pad->GetWindowAttr().H != edge)) { // top & bottom edge
614 GetChildLayoutMetrics(*pad, m);
615 pad->GetWindowAttr().H = pad->GetWindowAttr().W = edge; // set both axis, one will be stretched
616 SetChildLayoutMetrics(*pad, m);
617 needLayout = true;
618 }
619 }
620 }
621
622 // Turn on/off control bar as needed
623 //
624 TWindow* tb = ChildWithId(IDW_TOOLBAR);
625 if (tb)
626 if ((space && tb->IsWindowVisible()) || (!space && !tb->IsWindowVisible())) {
627 SendMessage(WM_COMMAND, IDW_TOOLBAR); // toggle tool bar on/off
628 needLayout = false; // layout already done now by decorated frame.
629 }
630
631 // Now do layout once at the end to reduce repaint
632 //
633 if (needLayout)
634 Layout();
635
636 return true;
637}
638
639//
640/// Responds to an OC_APPSTATUSTEXT message by displaying text from the server on
641/// this container's status bar.
642//
643void
644TOleFrame::EvOcAppStatusText(LPCTSTR text)
645{
648 if (mb) {
649 //mb->SetHintText(text); // is the text a hint, or general status??
650 mb->SetText(text);
651 }
652}
653
654//
655/// Stores a local copy of the pop-up menus so they can be used for menu merging and
656/// then destroyed later by DestroyStashedPopups. shMenuDescr is the shared menu
657/// descriptor to be stored. Increments StashCount each time the pop-up menus are saved.
658//
659void TOleFrame::StashContainerPopups(const TMenuDescr& shMenuDescr)
660{
661 StashCount++;
662
663 int m = 0;
664 for (int i = 0; i < 6; i++) {
665 if (i%2 == 0)
666 for (int j = 0; j < shMenuDescr.GetGroupCount(i); j++) {
667 uint state = shMenuDescr.GetMenuState(m+j, MF_BYPOSITION);
668 if (state == uint(-1))
669 continue;
670 TRACEX(OcfOleMenu, 1, _T("Stashing ") << hex << static_cast<void*>(shMenuDescr.GetSubMenu(m+j)));
671 StashedContainerPopups.AppendMenu(state, TMenu(shMenuDescr.GetSubMenu(m+j)), _T(""));
672 }
673 m += shMenuDescr.GetGroupCount(i);
674 }
675}
676
677//
678/// Destroys the previously stored shared pop-up menus. Checks to see if StashCount
679/// is 0 before destroying the menus.
680//
681void TOleFrame::DestroyStashedPopups()
682{
683 if (--StashCount)
684 return;
685
686 while (StashedContainerPopups.GetMenuItemCount()) {
687 TRACEX(OcfOleMenu, 1, _T("Destroying ") << hex << static_cast<void*>(StashedContainerPopups.GetSubMenu(0)));
688 StashedContainerPopups.DeleteMenu(0, MF_BYPOSITION);
689 }
690}
691
692//
693/// Responds to an OC_APPRESTOREUI message by restoring the container's normal menu
694/// and borders because in-place editing has finished.
695//
696void
697TOleFrame::EvOcAppRestoreUI()
698{
699 // Only restore the old menu if we are holding a merged one
700 //
701 if (HOldMenu) {
702 TRACEX(OcfOleMenu, 0, _T("EvOcAppRestoreUI resetting Old ") << hex <<
703 static_cast<void*>(HOldMenu));
704 TMenu oleMenu(GetHandle());
705 SetMenu(HOldMenu); // assumes we are just restoring the old owl menu
706 HOldMenu = 0;
707 }
708
709 // Remove pad decorations & restore our toobar if we have one
710 //
711 EvOcAppBorderSpaceSet(0);
712}
713
714//
715/// Responds to an OC_APPSHUTDOWN message indicating that the last embedded object
716/// has been closed. The response is to shut down the server.
717//
718bool
719TOleFrame::EvOcAppShutdown()
720{
721 // If TOleFrame was created purely for embedded server, then
722 // we want to shut down the app when nobody is using the server.
723 // The amEmbedding flag will be set to false if user created normal
724 // document in this frame.
725 //
726 if (OcShutDown == DontCare && OcApp->IsOptionSet(amEmbedding)) {
727 // The shut down is initiated by OCF
728 //
729 OcShutDown = ServerInitiated;
730
731 // Post frame close to kill the app later
732 //
733 PostMessage(WM_CLOSE);
734
735 return true;
736 }
737 else {
738
739 // If the last view closing caused the ocapp to shutdown, then close this
740 // frame.
741 //
742 if (OcApp->IsOptionSet(amEmbedding) && OcShutDown == ViewInitiated)
743 PostMessage(WM_CLOSE);
744
745 return false; // Shut down initiated by user
746 }
747}
748
749} // OCF namespace
750
751//==============================================================================
752
#define CHECK(condition)
Definition checks.h:239
#define PRECONDITION(condition)
Definition checks.h:227
#define TRACEX(group, level, message)
Definition checks.h:263
#define DIAG_DEFINE_GROUP_INIT(f, g, e, l)
Definition checks.h:429
OCF Application host class. Owner of & host for a TOcApp object.
Definition ocapp.h:367
OCF Application class.
Definition ocapp.h:144
Decorated frame that supports OLE 2 using OCF.
Definition oleframe.h:65
The generic OLE2 window. Use as a client of a frame window.
Definition olewindo.h:91
Class wrapper for management of color values.
Definition color.h:245
Base class for an extensible interface for auto enabling/disabling of commands (menu items,...
Definition window.h:209
TDecoratedFrame automatically positions its client window (you must supply a client window) so that i...
Definition decframe.h:74
TLocation
Enumeration describing the possible locations of a Gadgetwindow [Used mainly for location of Toolbar ...
Definition decframe.h:88
@ Bottom
Refers to bottom edge of frame.
Definition decframe.h:91
@ Top
Refers to top edge of frame.
Definition decframe.h:90
@ Left
Refers to left edge of frame.
Definition decframe.h:92
@ Right
Refers to right edge of frame.
Definition decframe.h:93
A nested class, TEventInfo provides specific information about the type of message sent,...
Definition eventhan.h:170
Derived from TWindow, TFrameWindow controls such window-specific behavior as keyboard navigation and ...
Definition framewin.h:96
When specifying the layout metrics for a window, four layout constraints are needed.
Definition layoutwi.h:54
Menu with information used to allow merging.
Definition menu.h:206
The TMenu class encapsulates window menus.
Definition menu.h:77
Derived from TGadgetWindow, TMessageBar implements a message bar with one text gadget as wide as the ...
Definition messageb.h:36
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:75
TNotify is a thin wrapper around the NMHDR structure.
Definition commctrl.h:91
TRect is a mathematical class derived from tagRect.
Definition geometry.h:308
The tagSIZE struct is defined as.
Definition geometry.h:234
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
void SetBkgndColor(TColor color, bool shouldUpdate=true)
Sets the background color for the window.
Definition window.h:1925
HWND THandle
TWindow encapsulates an HWND.
Definition window.h:418
Definition of classes for CommonControl encapsulation.
#define _T(x)
Definition cygwin.h:51
Definition of TDecoratedMDIFrame class.
#define END_RESPONSE_TABLE
Definition eventhan.h:466
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
Definition eventhan.h:492
#define NoErase
don't erase, wait for Paint
Definition window.h:116
#define ocrEmbedSource
Definition registry.h:638
#define ocrLinkSource
Definition registry.h:640
#define ocrEmbeddedObject
Definition registry.h:639
Include for OC, gets common headers when precompiled headers are enabled.
char * strnewdup(const char *s, size_t minAllocSize=0)
Definition memory.cpp:25
Object Component Framework (COM encapsulation)
Definition appdesc.h:22
const int IDT_DLLIDLE
Definition oleframe.h:33
const TDecoratedFrame::TLocation SpaceLoc[]
Definition oleframe.cpp:33
const int IDW_REMVIEWBUCKET
Definition oleframe.h:32
const int DllIdleTime
Definition oleframe.cpp:29
const int IDW_PADDECORATION
Definition oleframe.h:31
@ amExeMode
may be overridden per instance if running DLL
Definition ocreg.h:88
@ amEmbedding
cmdline, overridden per Instance if embedded DLL
Definition ocreg.h:82
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
const int IDW_TOOLBAR
Definition decframe.h:24
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
LPARAM TParam2
Second parameter type.
Definition dispatch.h:55
WPARAM TParam1
First parameter type.
Definition dispatch.h:54
OWL_DIAGINFO
Definition animctrl.cpp:14
const int IDW_STATUSBAR
Definition messageb.h:25
LRESULT TResult
Result type.
Definition dispatch.h:52
unsigned int uint
Definition number.h:25
#define WM_OCEVENT
Definition ocapp.h:337
Definition of OWL signatures for ObjectComponents messages.
#define EV_OC_APPBORDERSPACESET
Definition ocfevent.h:333
#define EV_OC_APPSTATUSTEXT
Definition ocfevent.h:334
#define EV_OC_APPMENUS
Definition ocfevent.h:329
#define EV_OC_APPINSMENUS
Definition ocfevent.h:328
#define EV_OC_APPRESTOREUI
Definition ocfevent.h:335
#define EV_OC_APPFRAMERECT
Definition ocfevent.h:331
#define EV_OC_APPPROCESSMSG
Definition ocfevent.h:330
#define EV_OC_APPSHUTDOWN
Definition ocfevent.h:337
#define EV_OC_APPBORDERSPACEREQ
Definition ocfevent.h:332
TOleWindow - Class encapsulating a window which can be an OLE container or server window.
#define OWL_INI
Definition defs.h:170
#define TYPESAFE_DOWNCAST(object, toClass)
Definition defs.h:269
Definition of class TStatusBar.
#define EV_WM_TIMER
Definition windowev.h:395
#define EV_WM_ACTIVATEAPP
Definition windowev.h:244
#define EV_WM_SIZE
Definition windowev.h:380
#define EV_MESSAGE(message, method)
Response table entry for raw message handling Uses a dispatcher that just forwards WPARAM and LPARAM.
Definition windowev.h:113