passing parameters to Cdialog
-
Hi I know the CDialog constructer takes two parameters an id template and Parent Cwnd if my derived CDialog wanted to pass a parameter woud be the first or last in my case I passed it as the first and got a warning
RTMDialog::RTMDialog(LPARAM mylparam, CWnd* pParent /*=NULL*/)
: CDialog(IDD_DIALOG9, pParent)the extra param is mylparam
-
Hi I know the CDialog constructer takes two parameters an id template and Parent Cwnd if my derived CDialog wanted to pass a parameter woud be the first or last in my case I passed it as the first and got a warning
RTMDialog::RTMDialog(LPARAM mylparam, CWnd* pParent /*=NULL*/)
: CDialog(IDD_DIALOG9, pParent)the extra param is mylparam
What kind of warning?
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
Hi I know the CDialog constructer takes two parameters an id template and Parent Cwnd if my derived CDialog wanted to pass a parameter woud be the first or last in my case I passed it as the first and got a warning
RTMDialog::RTMDialog(LPARAM mylparam, CWnd* pParent /*=NULL*/)
: CDialog(IDD_DIALOG9, pParent)the extra param is mylparam
-
What kind of warning?
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
progDebug.cpp(356): warning C4930: 'RTMDialog Abenddialog(LPARAM,CWnd *)': prototyped function not called (was a variable definition intended?)
Here is the source
RTMDialog Abenddialog(LPARAM mylparam, CWnd* pParent /*=NULL*/);
-
progDebug.cpp(356): warning C4930: 'RTMDialog Abenddialog(LPARAM,CWnd *)': prototyped function not called (was a variable definition intended?)
Here is the source
RTMDialog Abenddialog(LPARAM mylparam, CWnd* pParent /*=NULL*/);
This is a bit of a shot in the dark from me but I think you ran into the Most vexing parse - Wikipedia[^] This line:
RTMDialog Abenddialog(LPARAM mylparam, CWnd* pParent /*=NULL*/);
..has the signature of a function declaration but the name and arguments of your class constructor. I'm a bit confused about where it could be "located" as you've shown your class declaration with a proper constructor declaration and the proper (beginning) of the constructor implementation. Maybe it's just needless?
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
progDebug.cpp(356): warning C4930: 'RTMDialog Abenddialog(LPARAM,CWnd *)': prototyped function not called (was a variable definition intended?)
Here is the source
RTMDialog Abenddialog(LPARAM mylparam, CWnd* pParent /*=NULL*/);
-
progDebug.cpp(356): warning C4930: 'RTMDialog Abenddialog(LPARAM,CWnd *)': prototyped function not called (was a variable definition intended?)
Here is the source
RTMDialog Abenddialog(LPARAM mylparam, CWnd* pParent /*=NULL*/);
-
progDebug.cpp(356): warning C4930: 'RTMDialog Abenddialog(LPARAM,CWnd *)': prototyped function not called (was a variable definition intended?)
Here is the source
RTMDialog Abenddialog(LPARAM mylparam, CWnd* pParent /*=NULL*/);
Compiler Warning (level 1) C4930[^]:
C4930 can also occur when the compiler cannot distinguish between a function prototype declaration and a function call.
It looks like that is the case here and you wanted to create a dialog. Then it must be something like
RTMDialog Abenddialog(some_lparam, this);
-
class RTMDialog : public CDialog
{
DECLARE_DYNAMIC(RTMDialog)public:
RTMDialog(LPARAM mylparam,CWnd* pParent = NULL); // standard constructorSo where's the problem?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
So where's the problem?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles