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
oledialg.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectComponents
3// Copyright (c) 1995, 1996 by Borland International, All Rights Reserved
4/// \file
5/// Definition of class TOleDialog, a TDialog that can host OLE controls.
6//----------------------------------------------------------------------------
7
8#if !defined(OCF_OLEDIALG_H)
9#define OCF_OLEDIALG_H
10
11#include <owl/private/defs.h>
12#if defined(BI_HAS_PRAGMA_ONCE)
13# pragma once
14#endif
15
16/// \cond
17
18// Class name of stub control within a dialog which TOleDialog replaces with
19// an OCX at runtime. The caption of the control contains the ProgID of the
20// OCX to be created by TOleDialog.
21//
22#if !defined(OCX_STUB_CLASS)
23# define OCX_STUB_CLASS _T("OCX")
24#endif
25
26/// \endcond
27
28#if !defined(RC_INVOKED)
29
30#include <owl/dialog.h>
31#include <ocf/olewindo.h>
32
33
34namespace ocf {
35
36// Generic definitions/compiler options (eg. alignment) preceding the
37// definition of classes
38#include <owl/preclass.h>
39
40//
41/// \class TOleDialog
42// ~~~~~ ~~~~~~~~~~
43/// Provides OLE support to dialog boxes.
45{
46 public:
47 TOleDialog(owl::TWindow* parent, owl::TResId resId, owl::TModule* module = 0);
49
50 void SetupWindow() override;
51 auto IdleAction(long idleCount) -> bool override;
52 auto PreProcessMsg(MSG&) -> bool override;
53
54 protected:
55 bool EvOcViewSetSiteRect(owl::TRect * rect);
56
57 protected:
58 HWND CheckChild(HWND);
59 void LoadControl(HWND hControl);
60
61 /// Creates a TOcControl object that is initialized with the control's class
62 /// (calculated from ProgId) and position.
63 /// \todo This function is not implemented
64 void LoadControl(owl::TString ProgId, const owl::TRect& position);
65
67};
68
69//
70/// \class TRegisterOcxWnd
71// ~~~~~ ~~~~~~~~~~~~~~~
72/// Registers an OCX window for a subsequent call to the TOleDialog::SetupWindow
73/// function.
74//
76 public:
77 TRegisterOcxWnd(HINSTANCE);
79
80 protected:
81/// The application instance for which the OCX window is registered.
82 HINSTANCE HAppInst;
83};
84
85// Generic definitions/compiler options (eg. alignment) following the
86// definition of classes
87#include <owl/posclass.h>
88
89
90} // OCF namespace
91
92
93#endif // !RC_INVOKED
94
95#endif // OCF_OLEDIALG_H
Provides OLE support to dialog boxes.
Definition oledialg.h:45
void LoadControl(owl::TString ProgId, const owl::TRect &position)
Creates a TOcControl object that is initialized with the control's class (calculated from ProgId) and...
DECLARE_RESPONSE_TABLE(TOleDialog)
The generic OLE2 window. Use as a client of a frame window.
Definition olewindo.h:91
Registers an OCX window for a subsequent call to the TOleDialog::SetupWindow function.
Definition oledialg.h:75
HINSTANCE HAppInst
The application instance for which the OCX window is registered.
Definition oledialg.h:82
Typically used to obtain information from a user, a dialog box is a window inside of which other cont...
Definition dialog.h:85
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:75
TRect is a mathematical class derived from tagRect.
Definition geometry.h:308
Reference to reference counted string object TUString Lightweight reference object consisting of a po...
Definition string.h:67
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
Definition of TDialog class and TDialogAttr struct.
Object Component Framework (COM encapsulation)
Definition appdesc.h:22
#define _OCFCLASS
Definition defs.h:45
TOleWindow - Class encapsulating a window which can be an OLE container or server window.