Dialog Box question
-
Did you create a dialog ressource and derived a new CDialog class based on this ressource? Gero
-
I created the resource, but no.. didn't derive a new CDialog class. I thought I didn't have to.:~ I will try that. Thank you!
Use class-wizard to generate the derived class from CDialog. Remember to select the right dialog ressource id when generating the derived class. Gero
-
Use class-wizard to generate the derived class from CDialog. Remember to select the right dialog ressource id when generating the derived class. Gero
-
ok, I've done that, but still nothing happens when I click on the button. What am I not doing?:confused:
Did you use class wizard? Did you chose the right dialog ressource id in class wizard? Which type is m_chatterChooser now? Gero
-
Did you use class wizard? Did you chose the right dialog ressource id in class wizard? Which type is m_chatterChooser now? Gero
I have it as CDialog. I chose the resource ID for the dialog that I just built. (Chatter chooser). What do I have to change the type to? I put CCHooser which is the name of the class.. and I got errors. Please bear with me, I'm new to this. Thank you so much
-
I have it as CDialog. I chose the resource ID for the dialog that I just built. (Chatter chooser). What do I have to change the type to? I put CCHooser which is the name of the class.. and I got errors. Please bear with me, I'm new to this. Thank you so much
m_chatterChooser must be of type CChooser
-
I have it as CDialog. I chose the resource ID for the dialog that I just built. (Chatter chooser). What do I have to change the type to? I put CCHooser which is the name of the class.. and I got errors. Please bear with me, I'm new to this. Thank you so much
If your derived class is named CCHooser you have to include CCHooser.h in the source file where you have declared m_chatterChooser. #include "CCHooser.h" Gero
-
If your derived class is named CCHooser you have to include CCHooser.h in the source file where you have declared m_chatterChooser. #include "CCHooser.h" Gero
I have six errors!:confused: I have in my mainframe.cpp
#include "CHOOSER.h" #include "CHOOSER.cpp"
andvoid CMainFrame::OnSFile() { // attempting to open a small dialog box to choose a chatter to send file to: m_chatterChooser.DoModal();}
In my mainframe.h:CCHOOSER m_chatterChooser;
Also, the name of the class is CCHOOSER, but the fileview has chooser.cpp and chooser.h I know this is a simple thing.. why I am having so much trouble? :confused: -
I have six errors!:confused: I have in my mainframe.cpp
#include "CHOOSER.h" #include "CHOOSER.cpp"
andvoid CMainFrame::OnSFile() { // attempting to open a small dialog box to choose a chatter to send file to: m_chatterChooser.DoModal();}
In my mainframe.h:CCHOOSER m_chatterChooser;
Also, the name of the class is CCHOOSER, but the fileview has chooser.cpp and chooser.h I know this is a simple thing.. why I am having so much trouble? :confused:You must not include this line! #include "CHOOSER.cpp" Gero
-
You must not include this line! #include "CHOOSER.cpp" Gero
-
m_chatterChooser must be of type CChooser
Errors!
compiling... Mainfrm.cpp D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\mainfrm.h(48) : error C2146: syntax error : missing ';' before identifier 'm_chatterChooser' D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\mainfrm.h(48) : error C2501: 'CCHOOSER' : missing storage-class or type specifiers D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\mainfrm.h(48) : error C2501: 'm_chatterChooser' : missing storage-class or type specifiers D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\Mainfrm.cpp(162) : error C2065: 'm_chatterChooser' : undeclared identifier D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\Mainfrm.cpp(162) : error C2228: left of '.DoModal' must have class/struct/union type Error executing cl.exe. chatter.exe - 5 error(s), 0 warning(s)
:confused::confused::confused: -
Just send me your project (gerogerber@gmx.de), or tell me which errors you get. Gero
-
Errors!
compiling... Mainfrm.cpp D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\mainfrm.h(48) : error C2146: syntax error : missing ';' before identifier 'm_chatterChooser' D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\mainfrm.h(48) : error C2501: 'CCHOOSER' : missing storage-class or type specifiers D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\mainfrm.h(48) : error C2501: 'm_chatterChooser' : missing storage-class or type specifiers D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\Mainfrm.cpp(162) : error C2065: 'm_chatterChooser' : undeclared identifier D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\Mainfrm.cpp(162) : error C2228: left of '.DoModal' must have class/struct/union type Error executing cl.exe. chatter.exe - 5 error(s), 0 warning(s)
:confused::confused::confused:Maybe a misspelling - try CChooser instead CCHOOSER. C++ is case sensitive. Gero
-
Maybe a misspelling - try CChooser instead CCHOOSER. C++ is case sensitive. Gero
That didn't work, same 5 errors. I know C++ is case sensitive, that's why I put it in all caps. The class is in all caps. I'm going to delete the class and start again.. and give it a name that doesn't start with C! Is that a good idea? Thank you so much for your help!:rose::rose:
-
That didn't work, same 5 errors. I know C++ is case sensitive, that's why I put it in all caps. The class is in all caps. I'm going to delete the class and start again.. and give it a name that doesn't start with C! Is that a good idea? Thank you so much for your help!:rose::rose:
If you want send me the code. Gero
-
If you want send me the code. Gero
-
Errors!
compiling... Mainfrm.cpp D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\mainfrm.h(48) : error C2146: syntax error : missing ';' before identifier 'm_chatterChooser' D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\mainfrm.h(48) : error C2501: 'CCHOOSER' : missing storage-class or type specifiers D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\mainfrm.h(48) : error C2501: 'm_chatterChooser' : missing storage-class or type specifiers D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\Mainfrm.cpp(162) : error C2065: 'm_chatterChooser' : undeclared identifier D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\Mainfrm.cpp(162) : error C2228: left of '.DoModal' must have class/struct/union type Error executing cl.exe. chatter.exe - 5 error(s), 0 warning(s)
:confused::confused::confused:I try to help you: Pett wrote:
D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\mainfrm.h(48) : error C2146: syntax error : missing ';' before identifier 'm_chatterChooser' D
Here, m_chatterChooser has an unknown datatype. In the mainfrm.h mentioned write a line#include "chooser.h"
(next to the other#include
lines). Use the name of the FILE where CChooser is declared, not the name of the class itself. (normaly these differ by a leading 'C')and a trailing '.h' Pett wrote:D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\mainfrm.h(48) : error C2501: 'CCHOOSER' : missing storage-class or type specifiers
Here is the same problem. CHOOSER is wrong spelling (case-sensitive) Pett wrote:D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\mainfrm.h(48) : error C2501: 'm_chatterChooser' : missing storage-class or type specifiers
Here, same line - related problem! Pett wrote:D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\Mainfrm.cpp(162) : error C2065: 'm_chatterChooser' : undeclared identifier
The variable m_chatterChooser is not known - you due to the errors before. Pett wrote:D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\Mainfrm.cpp(162) : error C2228: left of '.DoModal' must have class/struct/union type
Same line-same problem. You can not call a methos from an non-existing object. Hope this helped. If you post your errors, it is much easier to help you. Don't give up. You WILL make it. I know how intimidating I was in the beginning when the compiler spat out hundreds of errors, just for one missing comma. -
If you want send me the code. Gero
-
I try to help you: Pett wrote:
D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\mainfrm.h(48) : error C2146: syntax error : missing ';' before identifier 'm_chatterChooser' D
Here, m_chatterChooser has an unknown datatype. In the mainfrm.h mentioned write a line#include "chooser.h"
(next to the other#include
lines). Use the name of the FILE where CChooser is declared, not the name of the class itself. (normaly these differ by a leading 'C')and a trailing '.h' Pett wrote:D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\mainfrm.h(48) : error C2501: 'CCHOOSER' : missing storage-class or type specifiers
Here is the same problem. CHOOSER is wrong spelling (case-sensitive) Pett wrote:D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\mainfrm.h(48) : error C2501: 'm_chatterChooser' : missing storage-class or type specifiers
Here, same line - related problem! Pett wrote:D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\Mainfrm.cpp(162) : error C2065: 'm_chatterChooser' : undeclared identifier
The variable m_chatterChooser is not known - you due to the errors before. Pett wrote:D:\Documents and Settings\Administrator\My Documents\CS61A Info\Assignment1\cs61a\CHATTER\Mainfrm.cpp(162) : error C2228: left of '.DoModal' must have class/struct/union type
Same line-same problem. You can not call a methos from an non-existing object. Hope this helped. If you post your errors, it is much easier to help you. Don't give up. You WILL make it. I know how intimidating I was in the beginning when the compiler spat out hundreds of errors, just for one missing comma.