193 for(
int i = 0;
i != count; ++
i)
210 const int count =
static_cast<int>(
data.Size());
211 for (
int i = 0;
i != count; ++
i)
216 if (
data.GetSelIndex() >= 0)
290 memset(&item,0,
sizeof(item));
295 item.iImage |=
Image();
303 item.lParam =
Param();
316 item.cchTextMax =
static_cast<int>(
Text().length() >
tsize ?
Text().length() :
tsize);
402 return Items->Destroy(index);
411 return Items->Add(item);
421 return (*
Items)[index];
439 return Items->Size();
#define PRECONDITION(condition)
#define DIAG_DECLARE_GROUP(group)
int AddItem(const TComboBoxExItem &item)
TComboBoxExItemArray * Items
TComboBoxExItem & GetItem(int index)
void SelectString(LPCTSTR str)
Selects "str", marking the matching String entry (if any) as selected.
const tstring & GetSelString() const
int DeleteItem(int index)
ComboBoxEx controls are combo box controls that provide native support for item images.
int InsertItem(const TComboBoxExItem &item)
void Transfer(TComboBoxExData &data, TTransferDirection op)
Safe overload.
void SetupWindow() override
void SetImageList(TImageList *list, TAutoDelete=AutoDelete)
bool SetItem(const TComboBoxExItem &item, INT_PTR index=-1)
TComboBoxEx(TWindow *parent, int id, int x, int y, int w, int h, uint32 style, uint textLimit, TModule *module=0)
auto GetWindowClassName() -> TWindowClassName override
Return the proper class name.
bool GetItem(TComboBoxExItem &item, INT_PTR index=-1)
Encapsulates an item in an extended combo box (COMBOBOXEXITEM).
TProperty< int > Selected
The item selected image.
void Init()
Initialises all data members to zero.
TObjProperty< tstring > Text
Band text label.
TProperty< int > Mask
Band image index (into rebar image list): don't use -1.
TProperty< int > Overlay
Band colors.
TProperty< LPARAM > Param
Additional data.
void ReFillItem(const COMBOBOXEXITEM &item)
Initializes this with native item.
TComboBoxExItem & operator=(const TComboBoxExItem &item)
Assigns the property data, not the properties themselves.
TProperty< int > Indent
Band colors.
TProperty< INT_PTR > Item
== -1 to add at end
void InitItem(COMBOBOXEXITEM &item, uint tsize=0) const
Initializes native item with this.
TProperty< int > Image
The item image.
You can use TComboBox to create a combo box or a combo box control in a parent TWindow,...
virtual void ClearList()
Clear all the entries in list part of the associated combobox.
void SetupWindow()
Limits the amount of text that the user can enter in the combo box's edit control to the value of Tex...
virtual int GetCount() const
Return the number of entries in list part of the associated combobox.
virtual int GetSelIndex() const
Returns the index of the list selection or a negative value if none exists.
virtual int SetSelIndex(int index)
Selects a string of characters in a combo box.
void SetText(LPCTSTR str)
Selects the first string in the associated list box that begins with the supplied str.
TImageList is a wrapper class for the ImageList common "control".
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...
TResult SendMessage(TMsgId, TParam1=0, TParam2=0) const
Sends a message (msg) to a specified window or windows.
HWND THandle
TWindow encapsulates an HWND.
HWND GetHandle() const
Returns the handle of the window.
Definition of class TComboBoxEx.
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
TAutoDelete
Flag for Handle ctors to control Handle deletion in dtor.
TObjectArray< TComboBoxExItem > TComboBoxExItemArray
TTransferDirection
The TTransferDirection enum describes the constants that the transfer function uses to determine how ...
@ tdSizeData
Return the size of data transferred by the class.
@ tdSetData
Set data from the buffer into the window.
@ tdGetData
Get data from the window into the buffer.
Definition of class TImageList, an ImageList Common Control wrapper.
Object Windows Library (OWLNext Core)
void InitializeCommonControls(uint controlFlags)
Wrapper for the Windows API function InitCommmonControlsEx.
LPARAM TParam2
Second parameter type.