Originally posted by: John Phelps
A sample showing the use of this class in a Formview or Dialog box would be of great help.
Does anyone have a sample illustrating the usage of this class ?
Originally posted by: Paul Barber
Replace the following lines to allow a dropdown to work properly
Replace:
afx_msg void OnKillFocus(CWnd* pNewWnd);
with:
afx_msg void OnKillFocus();
Replace:
ON_WM_KILLFOCUS()
with:
ON_CONTROL_REFLECT(CBN_KILLFOCUS,OnKillFocus)
Replace:
void CInPlaceList::OnKillFocus(CWnd* pNewWnd)
{
CComboBox::OnKillFocus(pNewWnd);
with:
void CInPlaceList::OnKillFocus()
{
// CComboBox::OnKillFocus(pNewWnd);
Originally posted by: Jonathan
I have a need to do the same thing as this sample, but instead of the combobox, a date/time picker. Is it possible to use the datetime picker control (with dropdown selection) to be used instead?
ReplyOriginally posted by: Bill Foust
I'm moving this thread back to the top level in the hopes of sparking
interest and conversation in the problem.
If you modify this class to have the style CBS_DROPDOWN instead of
CBS_DROPDOWNLIST bad things happen. Out of the box, the list appears and
disappears very quickly selecting the top item. If I remember right,
it also caused the default list ctrl edit item action (ie pop an edit box
over the 1st column of the item). I solved the later problem by removing
the LVS_EDITLABELS style and removing the code that checks for the sytle
since we aren't using it anyway. The former problem still happened however.
I was able to get some functionality by removing the SetFocus() call
CInPlaceList::Create(). I can now get the drop list, select the edit
control and make changes in there, but the control never gets a
KillFocus anymore so it stays there forever.
The main difference I've seen is that the drop down is actually 2 windows,
while the drop list, is only 1. Calling SetFocus in CInPlaceList::Create()
actually caused the edit control in the drop down to get focus, which caused
the list part of the control to get a KillFocus() call and caused it to
die and go away.
I'm not really in my element here working on it though. If anyone has any
suggestions, please let me know!
Thanks
Bill
Originally posted by: michali
I found this article very usefull for me.
there is one problem: I need a Drop Down List on the item and not on the subitem. but if I use it in the
item it works but if I click second time the edit box opened because I enable the LVS_EDITLABEL.
Is there any way to prevent the editbox to be open?
thank you very much.
Originally posted by: Toby Spendiff
Excellent article!
I was wondering how you would modify this to be a "drop down" instead of
a "drop down list"?
Toby.
Reply