46 int x,
int y,
int w,
int h,
69 int x,
int y,
int w,
int h,
103 memset(&Attr, 0x0,
sizeof(Attr));
121 memset(&Attr, 0x0,
sizeof(Attr));
139 " to handle" <<
static_cast<void*
>(
handle));
177 DefaultProcessing() !=
FALSE :
355#if OWL_PERSISTENT_STREAMS
369 static_cast<void>(
nu);
379TControl::Streamer::Write(opstream&
os)
const
381 TControl*
o = GetObject();
#define TRACEX(group, level, message)
#define DIAG_DEFINE_GROUP_INIT(f, g, e, l)
TControl unifies its derived control classes, such as TScrollBar, TControlGadget, and TButton.
auto EvEraseBkgnd(HDC) -> bool
Provides special handling for predefined controls.
void EvPaint()
Intercept WM_PAINT to redirect from TWindow to the underlying control if this Owl object is just a wr...
virtual void MeasureItem(MEASUREITEMSTRUCT &measureInfo)
Function called when a WM_MEASUREITEM is sent to parent on our behalf.
virtual void ODAFocus(DRAWITEMSTRUCT &drawInfo)
Responds to a notification sent to a drawable control when the focus has shifted to or from the contr...
virtual void ODASelect(DRAWITEMSTRUCT &drawInfo)
Responds to a notification sent to a drawable control when the selection state of the control changes...
virtual void ODADrawEntire(DRAWITEMSTRUCT &drawInfo)
Responds to a notification message sent to a drawable control when the control needs to be drawn.
void EvMeasureItem(uint ctrlId, MEASUREITEMSTRUCT &meas)
Handles WM_MEASUREITEM message (for owner draw controls) by calling the corresponding virtual functio...
void EvDeleteItem(uint ctrlId, const DELETEITEMSTRUCT &del)
Handles WM_DELETEITEM message (for owner draw controls) by calling the corresponding virtual function...
virtual void DrawItem(DRAWITEMSTRUCT &drawInfo)
Function called when a WM_DRAWITEM is sent to parent on our behalf.
void EvDrawItem(uint ctrlId, const DRAWITEMSTRUCT &draw)
Handles WM_DRAWITEM message (for owner draw controls) by calling the corresponding virtual function.
TControl(TWindow *parent, int id, LPCTSTR title, int x, int y, int w, int h, TModule *module=nullptr)
Invokes TWindow's constructor, passing it parent (parent window), title (caption text),...
int EvCompareItem(uint ctrlId, const COMPAREITEMSTRUCT &comp)
Handles WM_COMPAREITEM message (for owner draw controls) by calling the corresponding virtual functio...
virtual void DeleteItem(DELETEITEMSTRUCT &deleteInfo)
Function called when a WM_DELETEITEM is sent to parent on our behalf.
virtual int CompareItem(COMPAREITEMSTRUCT &compareInfo)
Function called when a WM_COMPAREITEM is sent to parent on our behalf.
virtual void Measure(MEASUREITEMSTRUCT &)
virtual void Draw(DRAWITEMSTRUCT &)
virtual int Compare(COMPAREITEMSTRUCT &)
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...
bool EvEraseBkgnd(HDC)
Handler for WM_ERASEBKGND.
void EvPaint()
Response method for an incoming WM_PAINT message.
void Init(TWindow *parent, LPCTSTR title, TModule *module)
Normal initialization of a default constructed TWindow.
void SetFlag(uint mask)
Sets the specified TWindow wfXxxx constant flags (for example wfAlias, wfTransfer,...
void EnableTransfer()
Enables the transfer mechanism, which allows state data to be transferred between the window and a tr...
TResult DefaultProcessing()
Handles default processing of events, which includes continued processing of menu/accelerators comman...
bool IsFlagSet(uint mask)
Returns the state of the bit flag in Attr.Flags whose mask is supplied.
HWND THandle
TWindow encapsulates an HWND.
HWND GetHandle() const
Returns the handle of the window.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Definition of class TControl.
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
void ReadBaseObject(Base *base, ipstream &in)
#define IMPLEMENT_STREAMABLE1(cls, base1)
void WriteBaseObject(Base *base, opstream &out)
@ wfPredefinedClass
Window class used belongs to a predefined Windows class and was not defined by OWL.
@ wfFromResource
Handle comes from HWND created from resource.
Object Windows Library (OWLNext Core)
TDrawItem * ItemData2DrawItem(ULONG_PTR data)
Handles WM_DRAWITEM message (for owner draw controls & menus) by forwarding message to control itself...