Click here to Skip to main content
15,886,873 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalvariable problem Pin
Anonymous24-May-05 5:50
Anonymous24-May-05 5:50 
GeneralRe: variable problem Pin
jmkhael24-May-05 6:00
jmkhael24-May-05 6:00 
GeneralRe: variable problem Pin
Anonymous24-May-05 6:13
Anonymous24-May-05 6:13 
GeneralRe: variable problem Pin
David Crow24-May-05 6:17
David Crow24-May-05 6:17 
GeneralRe: variable problem Pin
jmkhael24-May-05 6:18
jmkhael24-May-05 6:18 
GeneralRe: variable problem Pin
Anonymous24-May-05 6:24
Anonymous24-May-05 6:24 
GeneralRe: variable problem Pin
Bob Stanneveld24-May-05 7:18
Bob Stanneveld24-May-05 7:18 
Generalplease help with my attempt to edit subitem of CListCtrl Pin
lucy24-May-05 5:48
lucy24-May-05 5:48 
I'm trying to edit subitem of a CListCtrl object. Here's what I do:

void CMyDialog::OnBeginLabelEditMyListCtrl(NMHDR* pNMHDR, LRESULT *pResult)
{
// based on current mouse position, find out which item and
// iSubItem are being clicked by using m_myListCtrl.SubItemHitTest(&ht)

// get the rect of the licked sub item by
// m_myListCtrl.getSubItemRect(ht.iItem, ht.iSubItem, LVIR_LABEL, subRect);

// try to put my variable CEdit m_edit at this location
CEdit *plistEdit = m_myListCtrl.GetEditControl();
if ( plistEdit )
{
m_edit.SubClassWindow(plistEdit->m_hWnd); <--- ERROR here
}

// coding to set *pResult
}

when running, the error message is:
Error: Trying to use SubclassWindow with incorrect CWnd
derived class.
hWnd = $608D8 (nIDC=$0000) is not a CEdit.

how come? both plistEdit and m_edit are of CEdit, why this error?

Thanks for any help!
GeneralRe: please help with my attempt to edit subitem of CListCtrl Pin
lucy24-May-05 9:15
lucy24-May-05 9:15 
GeneralRe: please help with my attempt to edit subitem of CListCtrl Pin
PJ Arends24-May-05 9:26
professionalPJ Arends24-May-05 9:26 
GeneralRe: please help with my attempt to edit subitem of CListCtrl Pin
lucy25-May-05 3:11
lucy25-May-05 3:11 
Generalicons Pin
Dennis L24-May-05 5:42
Dennis L24-May-05 5:42 
GeneralRe: icons Pin
David Crow24-May-05 7:57
David Crow24-May-05 7:57 
GeneralRuntime Error on PCRE library, really need help! Pin
tomfd3s24-May-05 5:07
tomfd3s24-May-05 5:07 
GeneralRe: Runtime Error on PCRE library, really need help! Pin
tomfd3s24-May-05 5:12
tomfd3s24-May-05 5:12 
GeneralRe: Runtime Error on PCRE library, really need help! Pin
jmkhael24-May-05 6:55
jmkhael24-May-05 6:55 
GeneralRe: Runtime Error on PCRE library, really need help! Pin
tomfd3s24-May-05 20:57
tomfd3s24-May-05 20:57 
GeneralMDI Toolbar switch Pin
act_x24-May-05 4:29
act_x24-May-05 4:29 
GeneralRe: MDI Toolbar switch Pin
PJ Arends24-May-05 9:04
professionalPJ Arends24-May-05 9:04 
General_CrtIsValidHeapPointer Pin
Bob Stanneveld24-May-05 4:23
Bob Stanneveld24-May-05 4:23 
GeneralRe: _CrtIsValidHeapPointer Pin
jmkhael24-May-05 6:43
jmkhael24-May-05 6:43 
GeneralRe: _CrtIsValidHeapPointer Pin
Bob Stanneveld25-May-05 21:16
Bob Stanneveld25-May-05 21:16 
GeneralProblem in handling menu :( Pin
nripun24-May-05 4:07
nripun24-May-05 4:07 
QuestionFilmstrip control? Pin
Obliterator24-May-05 2:53
Obliterator24-May-05 2:53 
GeneralDynamic memomory error Pin
evgumin24-May-05 2:26
evgumin24-May-05 2:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.