|
-
May 31st, 1999, 08:50 AM
#1
HELP!
I have two classes,
class Classone : public CDialog
{
private :
CStrings etc...
void stop();
Public :
other stuff ();
}
class ClassTwo : public CDialog
{
private :
CStrings stuff, etc...
public :
ClassTwo(const char *pFileName, CWnd* pParent = NULL);
protected :
afx_msg void OnStart();
}
How can I call OnStart() from Stop() ????
-
May 31st, 1999, 09:07 AM
#2
Re: HELP!
In ClassTwo, create a public member function that calls OnStart(). Then call that member function from Stop() in ClassOne. I think you can move the declaration of the message handler OnStart() into a public section, but that is not recommended.
Chris R. Wheeler, MCP
Pensacola Christian College
Desktop Programmer
[email protected]
-
May 31st, 1999, 09:16 AM
#3
Re: HELP!
Do I call this by doing this :
ClassTwo :: CallOnStart();
I keep getting : illegal call of non-static member function
:-(
-
May 31st, 1999, 09:46 AM
#4
Re: HELP!
True. I forgot about that and assumed you had an instance of ClassTwo. Try putting static in front of the declaration of CallOnStart() and maybe that'll help. (I'm fairly new to VC++ 6 and have never actually tried to create a static function, but that is the simply theory of it. :-)
Chris R. Wheeler, MCP
Pensacola Christian College
Desktop Programmer
[email protected]
-
May 31st, 1999, 09:56 AM
#5
Re: HELP!
nope, same thing, this problem has been holding me up for 3 days now, it seems simple but its causing me much distress!!!! Thanks for the suggestions!!! Any help is much appreciated!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|