9#if !defined(OWL_COMBOBEX_H)
13#if defined(BI_HAS_PRAGMA_ONCE)
43 TComboBoxExItem(
const tstring& str, INT_PTR item,
int image,
int selectedImage,
int overlayImage = -1,
int indent = -1, LPARAM param = 0);
73 void InitItem(COMBOBOXEXITEM& item,
uint tsize = 0)
const;
127 void SetupWindow()
override;
131 void DeleteItem(DELETEITEMSTRUCT&)
override;
135 int EvCompareItem(
uint ctrlId,
const COMPAREITEMSTRUCT& comp);
136 void EvDeleteItem(
uint ctrlId,
const DELETEITEMSTRUCT& del);
137 void EvDrawItem(
uint ctrlId,
const DRAWITEMSTRUCT& draw);
138 void EvMeasureItem(
uint ctrlId, MEASUREITEMSTRUCT & meas);
178 const tstring& GetSelection()
const;
179 int GetSelIndex()
const;
180 int GetSelCount()
const;
181 void ResetSelections();
183 int GetSelStringLength()
const;
184 void GetSelString(LPTSTR buffer,
int bufferSize)
const;
204 return reinterpret_cast<HWND
>(
SendMessage(CBEM_GETEDITCONTROL,0));
210 return reinterpret_cast<HWND
>(
SendMessage(CBEM_GETCOMBOCONTROL, 0));
316 return static_cast<int>(
Selection.length());
#define PRECONDITION(condition)
void Select(int index)
Selects an item at a given index.
int GetSelStringLength() const
Returns the length of the selection string excluding the terminating 0.
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
void SelectString(const tstring &str)
int DeleteItem(int index)
ComboBoxEx controls are combo box controls that provide native support for item images.
int EvCompareItem(uint ctrlId, const COMPAREITEMSTRUCT &comp)
int InsertItem(const TComboBoxExItem &item)
void EvDeleteItem(uint ctrlId, const DELETEITEMSTRUCT &del)
uint32 GetExtendedStyle() const
TImageList * GetImageList()
void Transfer(TComboBoxExData &data, TTransferDirection op)
Safe overload.
void SetUnicode(bool unicode)
int DeleteItem(int index)
void EvDrawItem(uint ctrlId, const DRAWITEMSTRUCT &draw)
void EvMeasureItem(uint ctrlId, MEASUREITEMSTRUCT &meas)
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)
bool GetItem(TComboBoxExItem &item, INT_PTR index=-1)
uint32 SetExtendedStyle(uint32 mask, uint32 style)
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.
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.
TComboBox(TWindow *parent, int id, int x, int y, int w, int h, uint32 style, uint textLimit, TModule *module=0)
Constructs a combo box object with the specified parent window (parent), control ID (Id),...
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...
Property container for object.
TObjArrayIterator< TComboBoxExItem, TObjectArray< TComboBoxExItem > > Iterator
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 DefaultProcessing()
Handles default processing of events, which includes continued processing of menu/accelerators comman...
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 TComboBox and TComboBoxData the base class for all combobox controls.
Definition of classes for CommonControl encapsulation.
Definition of class TControl.
#define DECLARE_RESPONSE_TABLE(cls)
TAutoDelete
Flag for Handle ctors to control Handle deletion in dtor.
TComboBoxExItemArray::Iterator TComboBoxExItemArrayIter
TObjectArray< TComboBoxExItem > TComboBoxExItemArray
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)
Credits: The Property pattern is taken from "Patterns in Practice: A PropertyTemplate for C++",...