You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/mfc/reference/ccomboboxex-class.md
+36-36Lines changed: 36 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -34,28 +34,28 @@ class CComboBoxEx : public CComboBox
34
34
|Name|Description|
35
35
|----------|-----------------|
36
36
|[CComboBoxEx::Create](#create)|Creates the combo box and attaches it to the `CComboBoxEx` object.|
37
-
|[CComboBoxEx::CreateEx](#createex)|Creates a combo box with the specified Windows extended styles and attaches it to a **ComboBoxEx** object.|
38
-
|[CComboBoxEx::DeleteItem](#deleteitem)|Removes an item from a **ComboBoxEx** control.|
37
+
|[CComboBoxEx::CreateEx](#createex)|Creates a combo box with the specified Windows extended styles and attaches it to a `ComboBoxEx` object.|
38
+
|[CComboBoxEx::DeleteItem](#deleteitem)|Removes an item from a `ComboBoxEx` control.|
39
39
|[CComboBoxEx::GetComboBoxCtrl](#getcomboboxctrl)|Retrieves a pointer to the child combo box control.|
40
-
|[CComboBoxEx::GetEditCtrl](#geteditctrl)|Retrieves the handle to the edit control portion of a **ComboBoxEx** control.|
41
-
|[CComboBoxEx::GetExtendedStyle](#getextendedstyle)|Retrieves the extended styles that are in use for a **ComboBoxEx** control.|
42
-
|[CComboBoxEx::GetImageList](#getimagelist)|Retrieves a pointer to the image list assigned to a **ComboBoxEx** control.|
43
-
|[CComboBoxEx::GetItem](#getitem)|Retrieves item information for a given **ComboBoxEx** item.|
44
-
|[CComboBoxEx::HasEditChanged](#haseditchanged)|Determines if the user has changed the contents of the **ComboBoxEx** edit control by typing.|
45
-
|[CComboBoxEx::InsertItem](#insertitem)|Inserts a new item in a **ComboBoxEx** control.|
46
-
|[CComboBoxEx::SetExtendedStyle](#setextendedstyle)|Sets extended styles within a **ComboBoxEx** control.|
47
-
|[CComboBoxEx::SetImageList](#setimagelist)|Sets an image list for a **ComboBoxEx** control.|
48
-
|[CComboBoxEx::SetItem](#setitem)|Sets the attributes for an item in a **ComboBoxEx** control.|
40
+
|[CComboBoxEx::GetEditCtrl](#geteditctrl)|Retrieves the handle to the edit control portion of a `ComboBoxEx` control.|
41
+
|[CComboBoxEx::GetExtendedStyle](#getextendedstyle)|Retrieves the extended styles that are in use for a `ComboBoxEx` control.|
42
+
|[CComboBoxEx::GetImageList](#getimagelist)|Retrieves a pointer to the image list assigned to a `ComboBoxEx` control.|
43
+
|[CComboBoxEx::GetItem](#getitem)|Retrieves item information for a given `ComboBoxEx` item.|
44
+
|[CComboBoxEx::HasEditChanged](#haseditchanged)|Determines if the user has changed the contents of the `ComboBoxEx` edit control by typing.|
45
+
|[CComboBoxEx::InsertItem](#insertitem)|Inserts a new item in a `ComboBoxEx` control.|
46
+
|[CComboBoxEx::SetExtendedStyle](#setextendedstyle)|Sets extended styles within a `ComboBoxEx` control.|
47
+
|[CComboBoxEx::SetImageList](#setimagelist)|Sets an image list for a `ComboBoxEx` control.|
48
+
|[CComboBoxEx::SetItem](#setitem)|Sets the attributes for an item in a `ComboBoxEx` control.|
49
49
|[CComboBoxEx::SetWindowTheme](#setwindowtheme)|Sets the visual style of the extended combo box control.|
50
50
51
51
## Remarks
52
52
By using `CComboBoxEx` to create combo box controls, you no longer need to implement your own image drawing code. Instead, use `CComboBoxEx` to access images from an image list.
53
53
54
54
## Image List Support
55
-
In a standard combo box, the owner of the combo box is responsible for drawing an image by creating the combo box as an owner-draw control. When you use `CComboBoxEx`, you do not need to set the drawing styles **CBS_OWNERDRAWFIXED** and **CBS_HASSTRINGS** because they are implied. Otherwise, you must write code to perform drawing operations. A `CComboBoxEx` control supports up to three images per item: one for a selected state, one for an unselected state, and one for an overlay image.
55
+
In a standard combo box, the owner of the combo box is responsible for drawing an image by creating the combo box as an owner-draw control. When you use `CComboBoxEx`, you do not need to set the drawing styles CBS_OWNERDRAWFIXED and CBS_HASSTRINGS because they are implied. Otherwise, you must write code to perform drawing operations. A `CComboBoxEx` control supports up to three images per item: one for a selected state, one for an unselected state, and one for an overlay image.
56
56
57
57
## Styles
58
-
`CComboBoxEx` supports the styles **CBS_SIMPLE**, **CBS_DROPDOWN**, **CBS_DROPDOWNLIST**, and **WS_CHILD**. All other styles passed when you create the window are ignored by the control. After the window is created, you can provide other combo box styles by calling the `CComboBoxEx` member function [SetExtendedStyle](#setextendedstyle). With these styles, you can:
58
+
`CComboBoxEx` supports the styles CBS_SIMPLE, CBS_DROPDOWN, CBS_DROPDOWNLIST, and WS_CHILD. All other styles passed when you create the window are ignored by the control. After the window is created, you can provide other combo box styles by calling the `CComboBoxEx` member function [SetExtendedStyle](#setextendedstyle). With these styles, you can:
59
59
60
60
- Set string searches in the list to be case-sensitive.
61
61
@@ -112,7 +112,7 @@ virtual BOOL Create(
112
112
A reference to a [CRect](../../atl-mfc-shared/reference/crect-class.md) object or [RECT](http://msdn.microsoft.com/library/windows/desktop/dd162897) structure, which is the position and size of the combo box.
113
113
114
114
*pParentWnd*
115
-
A pointer to a [CWnd](../../mfc/reference/cwnd-class.md) object that is the parent window of the combo box (usually a `CDialog`). It must not be **NULL**.
115
+
A pointer to a [CWnd](../../mfc/reference/cwnd-class.md) object that is the parent window of the combo box (usually a `CDialog`). It must not be NULL.
116
116
117
117
*nID*
118
118
Specifies the combo box's control ID.
@@ -131,17 +131,17 @@ virtual BOOL Create(
131
131
132
132
When you create the combo box, you can specify any or all of the following combo-box styles:
133
133
134
-
-**CBS_SIMPLE**
134
+
- CBS_SIMPLE
135
135
136
-
-**CBS_DROPDOWN**
136
+
- CBS_DROPDOWN
137
137
138
-
-**CBS_DROPDOWNLIST**
138
+
- CBS_DROPDOWNLIST
139
139
140
-
-**CBS_AUTOHSCROLL**
140
+
- CBS_AUTOHSCROLL
141
141
142
-
-**WS_CHILD**
142
+
- WS_CHILD
143
143
144
-
All other styles passed when you create the window are ignored. The **ComboBoxEx** control also supports extended styles that provide additional features. These styles are described in [ComboBoxEx control extended styles](http://msdn.microsoft.com/library/windows/desktop/bb775742), in the Windows SDK. Set these styles by calling [SetExtendedStyle](#setextendedstyle).
144
+
All other styles passed when you create the window are ignored. The `ComboBoxEx` control also supports extended styles that provide additional features. These styles are described in [ComboBoxEx control extended styles](http://msdn.microsoft.com/library/windows/desktop/bb775742), in the Windows SDK. Set these styles by calling [SetExtendedStyle](#setextendedstyle).
145
145
146
146
If you want to use extended windows styles with your control, call [CreateEx](#createex) instead of `Create`.
147
147
@@ -179,10 +179,10 @@ virtual BOOL CreateEx(
179
179
### Remarks
180
180
Use `CreateEx` instead of `Create` to apply extended Windows styles, specified by the Windows extended style preface **WS_EX_**.
181
181
182
-
`CreateEx` creates the control with the extended Windows styles specified by *dwExStyle*. You must set extended styles specific to an extended combo box control using [SetExtendedStyle](#setextendedstyle). For example, use `CreateEx` to set such styles as **WS_EX_CONTEXTHELP**, but use `SetExtendedStyle` to set such styles as **CBES_EX_CASESENSITIVE**. For more information, see the styles described in the topic [ComboBoxEx Control Extended Styles](http://msdn.microsoft.com/library/windows/desktop/bb775742) in the Windows SDK.
182
+
`CreateEx` creates the control with the extended Windows styles specified by *dwExStyle*. You must set extended styles specific to an extended combo box control using [SetExtendedStyle](#setextendedstyle). For example, use `CreateEx` to set such styles as WS_EX_CONTEXTHELP, but use `SetExtendedStyle` to set such styles as CBES_EX_CASESENSITIVE. For more information, see the styles described in the topic [ComboBoxEx Control Extended Styles](http://msdn.microsoft.com/library/windows/desktop/bb775742) in the Windows SDK.
The number of items remaining in the control. If *iIndex* is invalid, the function returns **CB_ERR**.
196
+
The number of items remaining in the control. If *iIndex* is invalid, the function returns CB_ERR.
197
197
198
198
### Remarks
199
-
This member function implements the functionality of the message [CBEM_DELETEITEM](http://msdn.microsoft.com/library/windows/desktop/bb775768), as described in the Windows SDK. When you call DeleteItem, a [WM_NOTIFY](http://msdn.microsoft.com/library/windows/desktop/bb775583) message with **CBEN_DELETEITEM** notification will be sent to the parent window.
199
+
This member function implements the functionality of the message [CBEM_DELETEITEM](http://msdn.microsoft.com/library/windows/desktop/bb775768), as described in the Windows SDK. When you call DeleteItem, a [WM_NOTIFY](http://msdn.microsoft.com/library/windows/desktop/bb775583) message with CBEN_DELETEITEM notification will be sent to the parent window.
The `DWORD` value that contains the extended styles that are used for the combo box control.
239
+
The DWORD value that contains the extended styles that are used for the combo box control.
240
240
241
241
### Remarks
242
242
See [ComboBoxEx Control Extended Styles](http://msdn.microsoft.com/library/windows/desktop/bb775742) in the Windows SDK for more information about these styles.
This member function implements the functionality of the message [CBEM_GETITEM](http://msdn.microsoft.com/library/windows/desktop/bb775779), as described in the Windows SDK.
Determines if the user has changed the contents of the **ComboBoxEx** edit control by typing.
275
+
Determines if the user has changed the contents of the `ComboBoxEx` edit control by typing.
276
276
277
277
```
278
278
BOOL HasEditChanged();
@@ -285,7 +285,7 @@ BOOL HasEditChanged();
285
285
This member function implements the functionality of the message [CBEM_HASEDITCHANGED](http://msdn.microsoft.com/library/windows/desktop/bb775782), as described in the Windows SDK.
A `DWORD` value that indicates which styles in *dwExStyles* are to be affected. Only the extended styles in *dwExMask* will be changed. All other styles will be maintained as is. If this parameter is zero, then all of the styles in *dwExStyles* will be affected.
315
+
A DWORD value that indicates which styles in *dwExStyles* are to be affected. Only the extended styles in *dwExMask* will be changed. All other styles will be maintained as is. If this parameter is zero, then all of the styles in *dwExStyles* will be affected.
316
316
317
317
*dwExStyles*
318
-
A `DWORD` value that contains the combo box control extended styles to set for the control.
318
+
A DWORD value that contains the combo box control extended styles to set for the control.
319
319
320
320
### Return Value
321
-
A `DWORD` value that contains the extended styles previously used for the control.
321
+
A DWORD value that contains the extended styles previously used for the control.
322
322
323
323
### Remarks
324
324
See [ComboBoxEx Control Extended Styles](http://msdn.microsoft.com/library/windows/desktop/bb775742) in the Windows SDK for more information about these styles.
325
325
326
326
To create a combo box extended control with extended windows styles, use [CreateEx](#createex).
A pointer to a `CImageList` object containing the images to use with the `CComboBoxEx` control.
338
338
339
339
### Return Value
340
-
A pointer to a [CImageList](../../mfc/reference/cimagelist-class.md) object containing the images previously used by the `CComboBoxEx` control. **NULL** if no image list was previously set.
340
+
A pointer to a [CImageList](../../mfc/reference/cimagelist-class.md) object containing the images previously used by the `CComboBoxEx` control. NULL if no image list was previously set.
341
341
342
342
### Remarks
343
343
This member function implements the functionality of the message [CBEM_SETIMAGELIST](http://msdn.microsoft.com/library/windows/desktop/bb775787), as described in the Windows SDK. If you change the height of the default edit control, call the Win32 function [SetWindowPos](http://msdn.microsoft.com/library/windows/desktop/ms633545) to resize your control after you call `SetImageList`, or it will not display properly.
344
344
345
345
The `CImageList` object pointed to by the return value is a temporary object and is destroyed during the next idle processing time.
346
346
347
347
## <aname="setitem"></a> CComboBoxEx::SetItem
348
-
Sets the attributes for an item in a **ComboBoxEx** control.
348
+
Sets the attributes for an item in a `ComboBoxEx` control.
Indicates that the splash screen should be displayed.
@@ -119,7 +119,7 @@ BOOL m_bShowSplash;
119
119
```
120
120
121
121
### Remarks
122
-
If `TRUE`, this means the splash screen for this application should be displayed during startup. The default implementation of [ParseParam](#parseparam) sets this data member to `TRUE` if [m_nShellCommand](#m_nshellcommand) is equal to `CCommandLineInfo::FileNew`.
122
+
If TRUE, this means the splash screen for this application should be displayed during startup. The default implementation of [ParseParam](#parseparam) sets this data member to TRUE if [m_nShellCommand](#m_nshellcommand) is equal to `CCommandLineInfo::FileNew`.
Indicates the shell command for this instance of the application.
@@ -247,7 +247,7 @@ virtual void ParseParam(
247
247
Indicates if this is the last parameter or flag on the command line.
248
248
249
249
### Remarks
250
-
[CWinApp::ParseCommandLine](../../mfc/reference/cwinapp-class.md#parsecommandline) calls `ParseParam` once for each parameter or flag on the command line, passing the argument to *pszParam*. If the first character of the parameter is a ' **-**' or a ' **/**', then it is removed and *bFlag* is set to `TRUE`. When parsing the final parameter, *bLast* is set to `TRUE`.
250
+
[CWinApp::ParseCommandLine](../../mfc/reference/cwinapp-class.md#parsecommandline) calls `ParseParam` once for each parameter or flag on the command line, passing the argument to *pszParam*. If the first character of the parameter is a ' **-**' or a ' **/**', then it is removed and *bFlag* is set to TRUE. When parsing the final parameter, *bLast* is set to TRUE.
251
251
252
252
The default implementation of this function recognizes the following flags: `/p`, `/pt`, `/dde`, `/Automation`, and `/Embedding`, as shown in the following table:
253
253
@@ -267,7 +267,7 @@ virtual void ParseParam(
267
267
268
268
The default implementation puts the first non-flag parameter into [m_strFileName](#m_strfilename). In the case of the `/pt` flag, the default implementation puts the second, third, and fourth non-flag parameters into [m_strPrinterName](#m_strprintername), [m_strDriverName](#m_strdrivername), and [m_strPortName](#m_strportname), respectively.
269
269
270
-
The default implementation also sets [m_bShowSplash](#m_bshowsplash) to `TRUE` only in the case of a new file. In the case of a new file, the user has taken action involving the application itself. In any other case, including opening existing files using the shell, the user action involves the file directly. In a document-centric standpoint, the splash screen does not need to announce the application starting up.
270
+
The default implementation also sets [m_bShowSplash](#m_bshowsplash) to TRUE only in the case of a new file. In the case of a new file, the user has taken action involving the application itself. In any other case, including opening existing files using the shell, the user action involves the file directly. In a document-centric standpoint, the splash screen does not need to announce the application starting up.
271
271
272
272
Override this function in your derived class to handle other flag and parameter values.
Points to the parent or owner window object (of type [CWnd](../../mfc/reference/cwnd-class.md)) to which the dialog object belongs. If it is **NULL**, the dialog object's parent window is set to the main application window.
74
+
Points to the parent or owner window object (of type [CWnd](../../mfc/reference/cwnd-class.md)) to which the dialog object belongs. If it is NULL, the dialog object's parent window is set to the main application window.
75
75
76
76
### Remarks
77
77
See [CDialog::CDialog](../../mfc/reference/cdialog-class.md#cdialog) for complete information.
0 commit comments