Click here to Skip to main content
15,915,328 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to making a hidden file Pin
Hamid_RT18-Aug-08 5:03
Hamid_RT18-Aug-08 5:03 
QuestionHow could I get the parent of an embedded control generically ? Pin
SherTeks17-Aug-08 18:48
SherTeks17-Aug-08 18:48 
AnswerRe: How could I get the parent of an embedded control generically ? Pin
Nibu babu thomas17-Aug-08 19:08
Nibu babu thomas17-Aug-08 19:08 
GeneralRe: How could I get the parent of an embedded control generically ? Pin
Naveen17-Aug-08 19:13
Naveen17-Aug-08 19:13 
GeneralRe: How could I get the parent of an embedded control generically ? Pin
Nibu babu thomas17-Aug-08 19:16
Nibu babu thomas17-Aug-08 19:16 
GeneralRe: How could I get the parent of an embedded control generically ? Pin
SherTeks17-Aug-08 19:28
SherTeks17-Aug-08 19:28 
GeneralRe: How could I get the parent of an embedded control generically ? Pin
Nibu babu thomas17-Aug-08 19:59
Nibu babu thomas17-Aug-08 19:59 
GeneralRe: How could I get the parent of an embedded control generically ? Pin
SherTeks17-Aug-08 21:59
SherTeks17-Aug-08 21:59 
Correction : In my previous post, please consider m_CmbEditBox as of type
CEditEx and not of type CEdit.

My exact requirement is like this :

On right-clicking the list box item the control reaches

CListBoxEx::OnContextMenu. Please see the comment :

void CListBoxEx::OnContextMenu(CWnd* pWnd, CPoint point) 
{
/* The GetParent() here returns CTempWnd * (obtained while debugging).
     I am expecting the return pointer to be of type CSubClassedComboBox
     bcoz the subclassed combo box of type CSubClassedComboBox is the
     list box's parent */
	GetParent()->TestFn();	
}


What am I doing wrong for list box bcoz the same mechanism for the child
edit box of the CSubClassedComboBox works fine ie.

void CEditEx::OnContextMenu(CWnd* pWnd, CPoint point) 
{
/* The GetParent() here returns CSubClassedComboBox * (obtained while debugging) which is correct and is the expected result. */
	GetParent()->TestFn();	
}


Is there anything to do with the temporary creation of the list box which
is not the case with edit box ? If so, how could I acquire the desired result ?

Thanks
AnswerRe: How could I get the parent of an embedded control generically ? Pin
Naveen17-Aug-08 19:11
Naveen17-Aug-08 19:11 
QuestionWeird stack corruption problem Pin
jozsurf17-Aug-08 18:11
jozsurf17-Aug-08 18:11 
AnswerRe: Weird stack corruption problem Pin
Naveen17-Aug-08 18:22
Naveen17-Aug-08 18:22 
AnswerRe: Weird stack corruption problem Pin
Stephen Hewitt17-Aug-08 18:24
Stephen Hewitt17-Aug-08 18:24 
GeneralRe: Weird stack corruption problem Pin
jozsurf17-Aug-08 18:33
jozsurf17-Aug-08 18:33 
GeneralRe: Weird stack corruption problem Pin
Stephen Hewitt17-Aug-08 18:36
Stephen Hewitt17-Aug-08 18:36 
GeneralRe: Weird stack corruption problem Pin
jozsurf17-Aug-08 19:45
jozsurf17-Aug-08 19:45 
GeneralRe: Weird stack corruption problem Pin
Stephen Hewitt17-Aug-08 19:57
Stephen Hewitt17-Aug-08 19:57 
GeneralRe: Weird stack corruption problem Pin
jozsurf17-Aug-08 20:23
jozsurf17-Aug-08 20:23 
GeneralRe: Weird stack corruption problem Pin
Nibu babu thomas17-Aug-08 18:52
Nibu babu thomas17-Aug-08 18:52 
GeneralRe: Weird stack corruption problem Pin
Stephen Hewitt17-Aug-08 19:49
Stephen Hewitt17-Aug-08 19:49 
GeneralRe: Weird stack corruption problem Pin
jozsurf17-Aug-08 19:55
jozsurf17-Aug-08 19:55 
QuestionDo I need call CString::Empty? Pin
fantasy121517-Aug-08 17:27
fantasy121517-Aug-08 17:27 
AnswerRe: Do I need call CString::Empty? Pin
Naveen17-Aug-08 17:46
Naveen17-Aug-08 17:46 
GeneralRe: Do I need call CString::Empty? Pin
fantasy121517-Aug-08 17:54
fantasy121517-Aug-08 17:54 
GeneralRe: Do I need call CString::Empty? Pin
Naveen17-Aug-08 18:01
Naveen17-Aug-08 18:01 
AnswerRe: Do I need call CString::Empty? Pin
ThatsAlok19-Aug-08 20:34
ThatsAlok19-Aug-08 20:34 

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.