- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Simple
- Dropdown
- Drop List
In this latter sense (display of choices), 2&3 are identical but the choices for 3 are fixed (i.e., not editable).
In my case, I have an input variable that takes on one of two modes in terms of choices:
A) a fixed value (hardwired; user cannot alter).
B) some editable (adjustable) value - presented in an edit box that the user can change.
For A, #3 (Drop List) would be ideal; for B, #2 (Dropdown) would be ideal.
This is actually very common in dialogs you see used in a variety of apps. in which a list may provide a series of "fixed" choices, and then a last one [e.g., Other (please specify)] - the "please specify" is editable. I believe Delphi allows one to configure this way fairly easily.
For CVF or IVF, I wonder if there is any way to configure either the ComboBox in the Resource Editor itself, or some trick coding using (for example) DlgSet, etc. to accomplish this.
Any help is appreciated.
p.s.
The so-called "Extended" ComboBox in the Resource Editor is of no help in overcoming this obstacle.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
e.g.
USE DFWINTY ! contains definitions of window messages such as CBEM_GETEDITCONTROL
Integer(handle) hEditControl, hComboWnd
hEditControl= SendMessage(hComboWnd, & handle of combo box
CBEM_GETEDITCONTROL , & message to send
0, & first message parameter
0 &second message parameter)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
e.g.
USE DFWINTY ! contains definitions of window messages such as CBEM_GETEDITCONTROL
Integer(handle) hEditControl, hComboWnd
hEditControl= SendMessage(hComboWnd, & handle of combo box
CBEM_GETEDITCONTROL , & message to send
0, & first message parameter
0 &second message parameter)
Thanks Anthony. You seem to be on the right track, if I could only get the coding apparatus figured out. I'll have to study and ponder your suggestion (which, btw, is consistent w/ what I see posted here: http://msdn.microsoft.com/en-us/library/bb775772%28VS.85%29.aspx).
I gather that the "Type" to be selected in the Extended ComboBox is DropDown (?).
I'll post back if I get hung up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Anthony. You seem to be on the right track, if I could only get the coding apparatus figured out. I'll have to study and ponder your suggestion (which, btw, is consistent w/ what I see posted here: http://msdn.microsoft.com/en-us/library/bb775772%28VS.85%29.aspx).
I gather that the "Type" to be selected in the Extended ComboBox is DropDown (?).
I'll post back if I get hung up.
If you don't want to use ComboBoxEx, (for example, because it's not supported by IFLOGM), I suggest the following technique on the plain ComboBox (untested):
- Use the dropdown combo
- Find the window of the edit box child window of the combo (hEdit = FindWindow("Edit"//char(0), NULL))
- Toggle the read-only flag of the edit control using EM_SETREADONLY.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can also use the CB_GETCOMBOBOXINFO message. The hwndItem member of the returned GETCOMBOBOXINFO structure contains the edit box window handle.
See :
http://msdn.microsoft.com/en-us/library/bb775839%28VS.85%29.aspx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a belated reply to all of the above (including Anthony & Jugoslav):
Anthony suggests an unsorted Extended ComboBox. Firstly, as I see it, the Extended ComboBox (for mysterious reasons) does not lend itself to use of commands like DlgSet under dfLOGM. Secondly, he suggests the following code to define the handle:
[bash]hEditControl= SendMessage(hComboWnd, & handle of combo box CBEM_GETEDITCONTROL , & message to send 0, & first message parameter 0 & second message parameter)[/bash]
but unfortunately, I have no idea what to do w/ that handle (sorry to be so thick). I would need a little more help to be convinced this would work (perhaps a simple exemplar project could be attached - I'd love to see it).
Jugoslav echoes my first point (above) and then suggests to:
- Use the dropdown combo
- Find the window of the edit box child window of the combo (hEdit = FindWindow("Edit"//char(0), NULL))
- Toggle the read-only flag of the edit control using EM_SetReadOnly.
Again, for me this leaves too much for the imagination. I've tinkered w/ this for hours, stared as MSDN articles, and cannot seem to get anything to work (probably don't have the code set up completely).
BVautier's comments are much appreciated. He mentions yet another approach (CB_GETCOMBOBOXINFO message) and that the "hWndItem member of the returned GetComboBoxInfo structure contains the edit box window handle." I have no idea what to do w/ this "edit box window handle" contained in the returned structure.
I appreciate all the suggestions but I'd need to (please) see a complete module for one such ComboBox to be convinced that the hybridization I seek is really possible. I remain skeptical and this notion may be a bit too academic.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page