13#if defined(OWL_SUPPORT_BWCC)
38 TControl(parent,
id, text, x, y, w, h, module)
40 IsCurrentDefPB =
false;
44 Attr.Style |= BS_DEFPUSHBUTTON;
47 Attr.Style |= BS_PUSHBUTTON;
56 TControl(parent, id, text, x, y, w, h, module)
58 IsCurrentDefPB =
false;
62 Attr.Style |= BS_DEFPUSHBUTTON;
65 Attr.Style |= BS_PUSHBUTTON;
81 IsCurrentDefPB =
false;
82 TRACEX(OwlControl,
OWL_CDLEVEL,
"TButton constructed from resource @" << (
void*)
this);
94 IsDefPB =
GetStyle() & BS_DEFPUSHBUTTON;
95 IsCurrentDefPB =
false;
114#if defined(OWL_SUPPORT_BWCC)
116 TRACEX(OwlControl, 1,
"BWCC button used for classname @" << (
void*)
this);
120 TRACEX(OwlControl, 1,
"Regular button used for classname @" << (
void*)
this);
134 TRACEX(OwlControl, 1,
"TButton::SetupWindow() @" << (
void*)
this);
135 if (IsDefPB && ((Attr.Style & BS_OWNERDRAW) == BS_OWNERDRAW))
136 Parent->HandleMessage(DM_SETDEFID, Attr.Id);
157 if ((Attr.Style & BS_OWNERDRAW) != BS_OWNERDRAW)
160 else if (IsCurrentDefPB)
161 return DLGC_BUTTON | DLGC_DEFPUSHBUTTON;
164 return DLGC_BUTTON | DLGC_UNDEFPUSHBUTTON;
176 if ((Attr.Style & BS_OWNERDRAW) != BS_OWNERDRAW)
178 else if (param1 == BS_DEFPUSHBUTTON) {
179 IsCurrentDefPB =
true;
182 else if (param1 == BS_PUSHBUTTON) {
183 IsCurrentDefPB =
false;
195#if OWL_PERSISTENT_STREAMS
204 is >> GetObject()->IsDefPB;
212TButton::Streamer::Write(opstream& os)
const
215 os << GetObject()->IsDefPB;
Definition of class TApplication.
Legacy support for Borland Windows Custom Controls (BWCC).
#define TRACEX(group, level, message)
TControl unifies its derived control classes, such as TScrollBar, TControlGadget, and TButton.
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),...
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Type-safe encapsulation of a Windows class name, a union between ATOM and LPCTSTR.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
TApplication * GetApplication() const
Gets a pointer to the TApplication object associated with this.
virtual auto GetWindowClassName() -> TWindowClassName
uint EvGetDlgCode(const MSG *msg)
The default message handler for WM_GETDLGCODE.
void DisableTransfer()
Disables (for the interface object) the transfer mechanism, which allows state data to be transferred...
uint32 GetStyle() const
Gets the style bits of the underlying window or the 'Style' member of the attribute structure associa...
TResult DefaultProcessing()
Handles default processing of events, which includes continued processing of menu/accelerators comman...
HWND THandle
TWindow encapsulates an HWND.
virtual void Invalidate(bool erase=true)
Invalidates (mark for painting) the entire client area of a window.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
void ReadBaseObject(Base *base, ipstream &in)
void WriteBaseObject(Base *base, opstream &out)
Object Windows Library (OWLNext Core).
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
LRESULT TResult
Result type.
EV_MESSAGE(BM_SETSTYLE, BMSetStyle)
IMPLEMENT_STREAMABLE1(TApplication, TModule)
DIAG_DECLARE_GROUP(OwlThread)