Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: How to hook CBN_DROPDOWN and CBN_CLOSEUP ? Pin
David Crow4-Jun-09 5:52
David Crow4-Jun-09 5:52 
AnswerRe: How to hook CBN_DROPDOWN and CBN_CLOSEUP ? Pin
alikalik4-Jun-09 5:57
alikalik4-Jun-09 5:57 
QuestionIdentifying disconnecting clients.. TCP/IP Server created using CAsyncSocket Pin
Shameer E.A.4-Jun-09 4:47
Shameer E.A.4-Jun-09 4:47 
AnswerRe: Identifying disconnecting clients.. TCP/IP Server created using CAsyncSocket Pin
norish4-Jun-09 5:35
norish4-Jun-09 5:35 
Questionsimple CObArray question? Pin
Software20074-Jun-09 4:36
Software20074-Jun-09 4:36 
GeneralRe: simple CObArray question? Pin
norish4-Jun-09 5:41
norish4-Jun-09 5:41 
GeneralRe: simple CObArray question? Pin
Software20074-Jun-09 6:05
Software20074-Jun-09 6:05 
QuestionOverloading Constructors - call complex from simple? [modified] Pin
Mike the Red4-Jun-09 4:19
Mike the Red4-Jun-09 4:19 
Hours of debugging have finally paid off, and I've learned that I can't do this:
class C {
	C(void);
	C(int iNum);
	C(int iNum, BOOL bBool);
}

C::C(void) 		{ C(0); };
C::C(int iNum) 		{ C(iNum, FALSE); };
C::C(int iNum, BOOL bBool) 	{ /* Do something with iNum & bBool */ };
I couldn't find any documentation telling me I couldn't do it that way, but it was definately causing problems.
So, is there another way to do it, or do I have to either (a) duplicate the code or (c) call a "constructor method" like this:
class C {
public:
	C(void)			{ constructor(0, FALSE); };
	C(int iNum)		{ constructor(iNum, FALSE); };
	C(int iNum, BOOL bBool)	{ constructor(iNum, bBool); };
protected:
	void constructor(int iNum, BOOL bBool);
};
void C::constructor(int iNum, BOOL bBool) { 
	// do something with args 
};
As always, any assistance, or indicators towards what to read, are greatly appreciated.

MZR

modified on Thursday, June 4, 2009 10:32 AM (forgot return type for C::constructor() )

AnswerRe: Overloading Constructors - call complex from simple? Pin
led mike4-Jun-09 4:39
led mike4-Jun-09 4:39 
GeneralIn the case of such a hierarchy, would repeated code for each param list be best? -nt- Pin
Mike the Red4-Jun-09 4:49
Mike the Red4-Jun-09 4:49 
QuestionRe: Overloading Constructors - call complex from simple? Pin
David Crow4-Jun-09 5:59
David Crow4-Jun-09 5:59 
GeneralRe: Overloading Constructors - call complex from simple? Pin
norish4-Jun-09 6:11
norish4-Jun-09 6:11 
AnswerRe: Overloading Constructors - call complex from simple? Pin
Stuart Dootson4-Jun-09 7:15
professionalStuart Dootson4-Jun-09 7:15 
GeneralRe: Overloading Constructors - call complex from simple? Pin
led mike4-Jun-09 7:43
led mike4-Jun-09 7:43 
GeneralRe: Overloading Constructors - call complex from simple? Pin
Stuart Dootson4-Jun-09 7:47
professionalStuart Dootson4-Jun-09 7:47 
GeneralRe: Overloading Constructors - call complex from simple? Pin
led mike4-Jun-09 8:02
led mike4-Jun-09 8:02 
AnswerRe: Overloading Constructors - call complex from simple? [modified] Pin
fiddleus5-Jun-09 8:09
fiddleus5-Jun-09 8:09 
QuestionTTS: Calculating the resulting length (in ms) of a synthesized audio stream. Pin
Souldrift4-Jun-09 4:15
Souldrift4-Jun-09 4:15 
AnswerRe: TTS: Calculating the resulting length (in ms) of a synthesized audio stream. Pin
molesworth4-Jun-09 4:34
molesworth4-Jun-09 4:34 
GeneralRe: TTS: Calculating the resulting length (in ms) of a synthesized audio stream. Pin
Souldrift4-Jun-09 4:44
Souldrift4-Jun-09 4:44 
QuestionCWnd* CWnd::GetDlgItem(int nID) const crashed? Pin
transoft4-Jun-09 3:54
transoft4-Jun-09 3:54 
AnswerRe: CWnd* CWnd::GetDlgItem(int nID) const crashed? Pin
KarstenK4-Jun-09 4:06
mveKarstenK4-Jun-09 4:06 
GeneralRe: CWnd* CWnd::GetDlgItem(int nID) const crashed? Pin
Rajesh R Subramanian4-Jun-09 4:08
professionalRajesh R Subramanian4-Jun-09 4:08 
AnswerRe: CWnd* CWnd::GetDlgItem(int nID) const crashed? Pin
norish4-Jun-09 4:48
norish4-Jun-09 4:48 
GeneralRe: CWnd* CWnd::GetDlgItem(int nID) const crashed? Pin
transoft4-Jun-09 5:08
transoft4-Jun-09 5:08 

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.