Click here to Skip to main content
16,011,578 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Will the following code cause memory leakage? Pin
wb2-Aug-04 6:19
wb2-Aug-04 6:19 
GeneralRe: Will the following code cause memory leakage? Pin
palbano2-Aug-04 7:43
palbano2-Aug-04 7:43 
GeneralRe: Will the following code cause memory leakage? Pin
ting6682-Aug-04 6:23
ting6682-Aug-04 6:23 
GeneralNot always... Pin
Navin2-Aug-04 6:50
Navin2-Aug-04 6:50 
AnswerRe: Will the following code cause memory leakage? Pin
Navin2-Aug-04 6:53
Navin2-Aug-04 6:53 
QuestionDowncasting? Pin
0v3rloader2-Aug-04 5:35
0v3rloader2-Aug-04 5:35 
AnswerRe: Downcasting? Pin
palbano2-Aug-04 5:58
palbano2-Aug-04 5:58 
GeneralBetter Description of the Problem: Pin
0v3rloader2-Aug-04 6:13
0v3rloader2-Aug-04 6:13 
I have some CEdit controls layed out on a dialog template resource. They are created automatically when the dialog box is (dynamically) created.

What I need to do is force my CEdit-derived class to attach itself to the already created control(s).

Consider this:
class CMyEdit : public CEdit
{
protected:
	virtual LRESULT DefWindowProc(...);
	.
	:
	.
};


Example of implementation:

int CMyDialog::OnInitDialog()
{
	CMyEdit *pEdit;

	pEdit = new CMyEdit;
	pEdit -> SubclassDlgItem(IDC_VAL, this);	// not enough!
	.
	:
	.
}


Subclassing seems to not solve my problem because, although I still receive OnPaint, ... notifications, I can't seem to receive the EN_CHANGE command nor the WM_UNDO, to just name a few.

How do I do about solving this?
GeneralRe: Better Description of the Problem: Pin
alex.barylski2-Aug-04 7:11
alex.barylski2-Aug-04 7:11 
GeneralRe: Better Description of the Problem: Pin
palbano2-Aug-04 7:46
palbano2-Aug-04 7:46 
GeneralRe: Better Description of the Problem: Pin
palbano2-Aug-04 8:02
palbano2-Aug-04 8:02 
GeneralCAN'T use ClassWizard!! Code is located in a Static Library. Pin
0v3rloader2-Aug-04 8:33
0v3rloader2-Aug-04 8:33 
GeneralRe: CAN'T use ClassWizard!! Code is located in a Static Library. Pin
alex.barylski2-Aug-04 18:47
alex.barylski2-Aug-04 18:47 
GeneralRe: CAN'T use ClassWizard!! Code is located in a Static Library. Pin
0v3rloader3-Aug-04 2:03
0v3rloader3-Aug-04 2:03 
GeneralCView VSCROLL intro Pin
birdman632-Aug-04 5:27
birdman632-Aug-04 5:27 
GeneralRe: CView VSCROLL intro Pin
alex.barylski2-Aug-04 7:13
alex.barylski2-Aug-04 7:13 
Generaltpkt paquets Pin
argali2-Aug-04 4:45
argali2-Aug-04 4:45 
GeneralWin socket & Dialog boxes Pin
pork chop2-Aug-04 4:43
pork chop2-Aug-04 4:43 
GeneralRe: Win socket & Dialog boxes Pin
palbano2-Aug-04 6:04
palbano2-Aug-04 6:04 
GeneralWindows Startup Pin
Ayman Mahmoud2-Aug-04 4:39
Ayman Mahmoud2-Aug-04 4:39 
GeneralRe: Windows Startup Pin
Jaime Stuardo2-Aug-04 5:02
Jaime Stuardo2-Aug-04 5:02 
GeneralRe: Windows Startup Pin
David Crow2-Aug-04 8:42
David Crow2-Aug-04 8:42 
GeneralDundas Grid question. Pin
Maximilien2-Aug-04 4:32
Maximilien2-Aug-04 4:32 
GeneralRe: Dundas Grid question. Pin
Peter Zajac3-Aug-04 10:04
Peter Zajac3-Aug-04 10:04 
GeneralModal listbox Pin
navratil2-Aug-04 4:14
navratil2-Aug-04 4:14 

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.