36:
TDialog(parent, IDD_INPUTDIALOG, module),
43 BufferSize = bufferSize;
45 (
new TEdit(
this,ID_INPUT))->SetValidator(validator);
60 :
TDialog(parent, IDD_INPUTDIALOG, module),
67 BufferSize = bufferSize;
69 (
new TEdit(
this,ID_INPUT))->SetValidator(validator);
75 const size_t DefaultBufferSize_ = 1024;
77 int CalculateBufferSize_(
const tstring& s)
80 return static_cast<int>(std::max(DefaultBufferSize_, s.size() + 1));
86 std::copy(s.begin(), s.end(), b);
87 b[s.size()] =
_T(
'\0');
106 :
TDialog(parent, IDD_INPUTDIALOG, module),
108 Buffer(AllocateAndInitializeBuffer_(initValue)),
109 BufferSize(CalculateBufferSize_(initValue)),
116 (
new TEdit(
this, ID_INPUT))->SetValidator(validator);
167#if OWL_PERSISTENT_STREAMS
193TInputDialog::Streamer::Write(opstream& os)
const
197 os.fwriteString(
_W2A(GetObject()->Prompt));
#define PRECONDITION(condition)
Typically used to obtain information from a user, a dialog box is a window inside of which other cont...
void SetupWindow() override
Overrides the virtual function defined in TWindow.
TDialog(TWindow *parent, TResId resId, TModule *module=nullptr)
Constructor for a TDialog object.
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
A streamable class, TValidator defines an abstract data validation object.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
void SetCaption(LPCTSTR title)
Copies title to an allocated string pointed to by title.
TResult SendDlgItemMessage(int childId, TMsgId, TParam1=0, TParam2=0)
Sends a message (msg) to the control specified in childId.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
char * freadString()
Reads a string from the stream.
Definition of class TEdit.
void ReadBaseObject(Base *base, ipstream &in)
void WriteBaseObject(Base *base, opstream &out)
TEdit(TWindow *parent, int id, LPCTSTR text, int x, int y, int w, int h, uint textLimit=0, bool multiline=false, TModule *=nullptr)
Constructs an edit control object with a parent window (parent).
TTransferDirection
The TTransferDirection enum describes the constants that the transfer function uses to determine how ...
@ tdSetData
Set data from the buffer into the window.
@ tdGetData
Get data from the window into the buffer.
char * strnewdup(const char *s, size_t minAllocSize=0)
Object Windows Library (OWLNext Core).
void SetDlgItemText(HWND ctrl, const tstring &text)
String overload.
IMPLEMENT_STREAMABLE2(TEditView, TEditSearch, TView)
tstring GetDlgItemText(HWND ctrl)
String overload.