10#if !defined(OWL_STATIC_H)
14#if defined(BI_HAS_PRAGMA_ONCE)
50 TStatic(
TWindow* parent,
int id, LPCTSTR title,
int x,
int y,
int w,
int h,
58 int GetTextLen()
const;
60 int GetText(LPTSTR str,
int maxChars)
const;
63 void SetText(LPCTSTR str);
65 void SetText(
uint resourceStringId);
72 uint GetTextLimit()
const;
73 void SetTextLimit(
uint textlimit);
77 HICON GetIcon()
const;
100 TTransferBufferFieldType GetTransferBufferFieldType()
const;
101 void SetTransferBufferFieldType(TTransferBufferFieldType);
107 HANDLE GetImage(TImageType imageType = Bitmap)
const;
108 HANDLE SetImage(HANDLE image, TImageType imageType = Bitmap );
142 DECLARE_RESPONSE_TABLE(
TStatic);
170 return reinterpret_cast<HICON
>(
CONST_CAST(
TStatic*,
this)->SendMessage(STM_GETICON));
187 return reinterpret_cast<HANDLE
>(
CONST_CAST(
TStatic*,
this)->SendMessage(STM_GETIMAGE,
static_cast<TParam2>(imageType)));
196 return reinterpret_cast<HANDLE
>(
SendMessage(STM_SETIMAGE,
static_cast<TParam1>(imageType),
reinterpret_cast<TParam2>(image)));
204 return ::GetWindowTextLength(
GetHandle());
213 return ::GetWindowText(
GetHandle(), str, maxChars);
249 TextLimit = textlimit;
#define PRECONDITION(condition)
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...
The tagSIZE struct is defined as.
An interface object that represents a static text interface element.
void SetText(const tstring &str)
uint GetTextLimit() const
Returns the length limit of the control's text.
tstring GetText() const
String-aware overload.
void SetTextLimit(uint textlimit)
Sets the size of the static control's transfer buffer; including space for the terminating null chara...
TTransferBufferFieldType TransferBufferFieldType
int GetTextLen() const
Return the current length of the text in the control, excluding the terminating null character.
HICON GetIcon() const
Returns the handle of the icon used for this static control.
HANDLE GetImage(TImageType imageType=Bitmap) const
Return handle of image used for static control.
TStatic(TWindow *parent, int id, LPCTSTR title, int x, int y, int w, int h, uint textLen=0, TModule *=nullptr)
Constructs a static control object with the supplied parent window (parent), control ID (Id),...
void SetText(LPCTSTR str)
Sets the static control's text to the string supplied in str.
void EvSize(uint sizeType, const TSize &size)
Overrides TWindow's virtual EvSize function.
auto GetWindowClassName() -> TWindowClassName override
Returns the name of TStatic's registration class (STATIC).
HANDLE SetImage(HANDLE image, TImageType imageType=Bitmap)
Set handle of image.
HICON SetIcon(HICON)
Sets the handle of the icon.
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...
tstring LoadString(uint id) const
tstring GetWindowText() const
String-aware overload.
void SetWindowText(LPCTSTR str)
Sets the window's text to the given string (by copying).
TResult SendMessage(TMsgId, TParam1=0, TParam2=0) const
Sends a message (msg) to a specified window or windows.
HWND GetHandle() const
Returns the handle of the window.
Definition of class TControl.
#define DECLARE_STREAMABLE_OWL(cls, ver)
#define DECLARE_STREAMABLE_INLINES(cls)
TTransferDirection
The TTransferDirection enum describes the constants that the transfer function uses to determine how ...
Object Windows Library (OWLNext Core).
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
#define CONST_CAST(targetType, object)