Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combo trait return NULL Text and Editor when trap in OnEditComplete #30

Closed
GoogleCodeExporter opened this issue Mar 16, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. click on the second column (combo) for only once 
2. Do not click on the dropdown arrow and click the other column or row
3. AfxMessageBox(_T("strCell =0 ")); AfxMessageBox(_T("pComboEditor == NULL"));

What is the expected output? What do you see instead?
   strCell and pComboEditor  should not be NULL

What version of the product are you using? On what operating system?
VC2010 with Winxp SP3 English version, latest code from googlecode.

Please provide any additional information below.


Original issue reported on code.google.com by maplew...@gmail.com on 16 Oct 2012 at 2:09

Attachments:

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

MSDN (http://msdn.microsoft.com/en-us/library/windows/desktop/bb774814.aspx) 
specifies that the LVN_ENDLABELEDIT notification will have the LVITEM member 
pszText set to NULL if the user cancels editing, otherwise pszText is the 
address of the edited text. Actually had another issue 
(http://code.google.com/p/cgridlistctrlex/issues/detail?id=11) about this 
initially wasn't working properly.

Also notice that LVITEM member lParam is set to the itemdata of item selected 
in the ComboBox, so you don't have to perform any extra lookups to find this 
value.

If you want get hold of the pointer to the dynamic created cell-editor, then 
you should consider to inherit from CGridListCtrlGroups, and add a method 
GetCellEditor(), that returns protected member variable m_pEditor. Instead of 
the GetDlgItem(pDispInfo->hdr.idFrom), since in next release the idFrom will be 
the m_ListCtrl.

Original comment by sweaty1 on 16 Oct 2012 at 8:32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant