DoModal error
-
what is the error?? how to fix the error ?? can u plz tell me..
Whats type CCreateDlg? and (you wrote)CCreateDlg *m_dCreateDlg; then you should use m_dCreateDlg->DoModal(); m_dCreateDlg.DoModal();
-
Hi, i have new button on sigle click i want a dialog window to open i have declared variables as follows.. can anyone help to solve this problem..?? UpdateDlg.h #include "StatusDlg.h" // Added by ClassView #include "CreateDlg.h" // Added by ClassView private: CStatusDlg m_dStatusDlg; class CCreateDlg; //Then declare a pointer: CCreateDlg *m_dCreateDlg; --------------------- // UpdateDlg.cpp : implementation file // #include "stdafx.h" #include "DesktopSearch.h" #include "StatusDlg.h" #include "CreateDlg.h" #include "UpdateDlg.h" #include "FoldersDialog.h" void CUpdateDlg::OnNew() { // TODO: Add your control notification handler code here m_dCreateDlg.DoModal(); } --------------------------------------------------------------- --------------------Configuration: DesktopSearch - Win32 Debug-------------------- Compiling... UpdateDlg.cpp D:\Parichay\DesktopSearch\DesktopSearch\UpdateDlg.cpp(182) : error C2228: left of '.DoModal' must have class/struct/union type Error executing cl.exe. DesktopSearch.exe - 1 error(s), 0 warning(s)
you are declaring the pointer in the CreateDlg file for the dialog That should be done in UpdateDlg.h that's all Vision is Always important and so is your ATTITUDE. Wishes. Anshuman Dandekar
-
Whats type CCreateDlg? and (you wrote)CCreateDlg *m_dCreateDlg; then you should use m_dCreateDlg->DoModal(); m_dCreateDlg.DoModal();
Hi white sky, the problem is i have new button in Update dialog window when i click on new button i have to open create dialog window .. so for that i declared CCreateDlg *m_dCreateDlg; member can u plz help me solve this error ----------- UpdateDlg.h #include "StatusDlg.h" // Added by ClassView #include "CreateDlg.h" // Added by ClassView private: CStatusDlg m_dStatusDlg; class CCreateDlg; //Then declare a pointer: CCreateDlg *m_dCreateDlg; --------------------------------------- -------------------- // UpdateDlg.cpp : implementation file // #include "stdafx.h" #include "DesktopSearch.h" #include "StatusDlg.h" #include "CreateDlg.h" #include "UpdateDlg.h" #include "FoldersDialog.h" void CUpdateDlg::OnNew() { // TODO: Add your control notification handler code here m_dCreateDlg->DoModal(); } --------------------------------------------------------------- --------------------Configuration: DesktopSearch - Win32 Debug-------------------- Compiling... UpdateDlg.cpp D:\Parichay\DesktopSearch\UpdateDlg.cpp(184) : error C2027: use of undefined type 'CCreateDlg' d:\parichay\desktopsearch\updatedlg.h(58) : see declaration of 'CCreateDlg' D:\Parichay\DesktopSearch\UpdateDlg.cpp(184) : error C2227: left of '->DoModal' must point to class/struct/union Error executing cl.exe. DesktopSearch.exe - 2 error(s), 0 warning(s) -- modified at 3:33 Tuesday 11th April, 2006
-
Hi white sky, the problem is i have new button in Update dialog window when i click on new button i have to open create dialog window .. so for that i declared CCreateDlg *m_dCreateDlg; member can u plz help me solve this error ----------- UpdateDlg.h #include "StatusDlg.h" // Added by ClassView #include "CreateDlg.h" // Added by ClassView private: CStatusDlg m_dStatusDlg; class CCreateDlg; //Then declare a pointer: CCreateDlg *m_dCreateDlg; --------------------------------------- -------------------- // UpdateDlg.cpp : implementation file // #include "stdafx.h" #include "DesktopSearch.h" #include "StatusDlg.h" #include "CreateDlg.h" #include "UpdateDlg.h" #include "FoldersDialog.h" void CUpdateDlg::OnNew() { // TODO: Add your control notification handler code here m_dCreateDlg->DoModal(); } --------------------------------------------------------------- --------------------Configuration: DesktopSearch - Win32 Debug-------------------- Compiling... UpdateDlg.cpp D:\Parichay\DesktopSearch\UpdateDlg.cpp(184) : error C2027: use of undefined type 'CCreateDlg' d:\parichay\desktopsearch\updatedlg.h(58) : see declaration of 'CCreateDlg' D:\Parichay\DesktopSearch\UpdateDlg.cpp(184) : error C2227: left of '->DoModal' must point to class/struct/union Error executing cl.exe. DesktopSearch.exe - 2 error(s), 0 warning(s) -- modified at 3:33 Tuesday 11th April, 2006
parichaybp, I think this code dont work because you declare CCreateDlg *m_dCreateDlg; [I think you get a error like this the variable m_dCreateDlg is begin used without.....] and I again repeat question whats type CCreateDlg ? (example in header file -> Is class CCreateDlg : public CDialog?or....)
-
parichaybp, I think this code dont work because you declare CCreateDlg *m_dCreateDlg; [I think you get a error like this the variable m_dCreateDlg is begin used without.....] and I again repeat question whats type CCreateDlg ? (example in header file -> Is class CCreateDlg : public CDialog?or....)
CreateDlg is Dialog window its same as UpdateDlg both the dialog window i have added using add resources...
-
parichaybp, I think this code dont work because you declare CCreateDlg *m_dCreateDlg; [I think you get a error like this the variable m_dCreateDlg is begin used without.....] and I again repeat question whats type CCreateDlg ? (example in header file -> Is class CCreateDlg : public CDialog?or....)
hi whitesky, Problem is there are 2 Dialog window, in the UpdateDlg dialog when i click on new button it should open create dialog window... please can u tell me what should be done and how the declaration shd be done ...
-
CreateDlg is Dialog window its same as UpdateDlg both the dialog window i have added using add resources...
parichaybp well, -------------In Main File CssDlg------------------------- #include "test2.h" .... private: class CTest2; //Then declare a pointer: CTest2 *m_dlg; --------------------------- void CssDlg::OnBnClickedButton3() { m_dlg.DoModal(); } d:\Projects\ss\ssDlg.cpp(418): error C2228: left of '.DoModal' must have class/struct/union type then I use void CssDlg::OnBnClickedButton3() { m_dlg->DoModal(); } d:\Projects\ss\ssDlg.cpp(418): error C2027: use of undefined type 'CssDlg::CTest2' d:\Projects\ss\ssDlg.cpp(418): error C2227: left of '->DoModal' must point to class/struct/union I find your problem delete private: class CTest2;//Then declare a pointer: CTest2 *m_dlg; -------------------------------------- and you should CTest2 m_dlg; Now It's work
-
hi whitesky, Problem is there are 2 Dialog window, in the UpdateDlg dialog when i click on new button it should open create dialog window... please can u tell me what should be done and how the declaration shd be done ...
I think Now it's work
-
parichaybp well, -------------In Main File CssDlg------------------------- #include "test2.h" .... private: class CTest2; //Then declare a pointer: CTest2 *m_dlg; --------------------------- void CssDlg::OnBnClickedButton3() { m_dlg.DoModal(); } d:\Projects\ss\ssDlg.cpp(418): error C2228: left of '.DoModal' must have class/struct/union type then I use void CssDlg::OnBnClickedButton3() { m_dlg->DoModal(); } d:\Projects\ss\ssDlg.cpp(418): error C2027: use of undefined type 'CssDlg::CTest2' d:\Projects\ss\ssDlg.cpp(418): error C2227: left of '->DoModal' must point to class/struct/union I find your problem delete private: class CTest2;//Then declare a pointer: CTest2 *m_dlg; -------------------------------------- and you should CTest2 m_dlg; Now It's work
Hi whitesky, its not working .. can u please have a look private: CStatusDlg m_dStatusDlg; // class CCreateDlg; //Then declare a pointer: CCreateDlg m_dCreateDlg; }; -----Error--- --------------------Configuration: DesktopSearch - Win32 Debug-------------------- Compiling... CreateDlg.cpp d:\parichay\desktopsearch\updatedlg.h(60) : error C2146: syntax error : missing ';' before identifier 'm_dCreateDlg' d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'CCreateDlg' : missing storage-class or type specifiers d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'm_dCreateDlg' : missing storage-class or type specifiers DesktopSearch.cpp d:\parichay\desktopsearch\updatedlg.h(60) : error C2146: syntax error : missing ';' before identifier 'm_dCreateDlg' d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'CCreateDlg' : missing storage-class or type specifiers d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'm_dCreateDlg' : missing storage-class or type specifiers DesktopSearchDlg.cpp d:\parichay\desktopsearch\updatedlg.h(60) : error C2146: syntax error : missing ';' before identifier 'm_dCreateDlg' d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'CCreateDlg' : missing storage-class or type specifiers d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'm_dCreateDlg' : missing storage-class or type specifiers UpdateDlg.cpp d:\parichay\desktopsearch\updatedlg.h(60) : error C2146: syntax error : missing ';' before identifier 'm_dCreateDlg' d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'CCreateDlg' : missing storage-class or type specifiers d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'm_dCreateDlg' : missing storage-class or type specifiers D:\Parichay\DesktopSearch\UpdateDlg.cpp(181) : error C2065: 'm_dCreatelg' : undeclared identifier D:\Parichay\DesktopSearch\UpdateDlg.cpp(181) : error C2227: left of '->DoModal' must point to class/struct/union Generating Code... Error executing cl.exe. DesktopSearch.exe - 14 error(s), 0 warning(s)
-
Hi whitesky, its not working .. can u please have a look private: CStatusDlg m_dStatusDlg; // class CCreateDlg; //Then declare a pointer: CCreateDlg m_dCreateDlg; }; -----Error--- --------------------Configuration: DesktopSearch - Win32 Debug-------------------- Compiling... CreateDlg.cpp d:\parichay\desktopsearch\updatedlg.h(60) : error C2146: syntax error : missing ';' before identifier 'm_dCreateDlg' d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'CCreateDlg' : missing storage-class or type specifiers d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'm_dCreateDlg' : missing storage-class or type specifiers DesktopSearch.cpp d:\parichay\desktopsearch\updatedlg.h(60) : error C2146: syntax error : missing ';' before identifier 'm_dCreateDlg' d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'CCreateDlg' : missing storage-class or type specifiers d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'm_dCreateDlg' : missing storage-class or type specifiers DesktopSearchDlg.cpp d:\parichay\desktopsearch\updatedlg.h(60) : error C2146: syntax error : missing ';' before identifier 'm_dCreateDlg' d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'CCreateDlg' : missing storage-class or type specifiers d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'm_dCreateDlg' : missing storage-class or type specifiers UpdateDlg.cpp d:\parichay\desktopsearch\updatedlg.h(60) : error C2146: syntax error : missing ';' before identifier 'm_dCreateDlg' d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'CCreateDlg' : missing storage-class or type specifiers d:\parichay\desktopsearch\updatedlg.h(60) : error C2501: 'm_dCreateDlg' : missing storage-class or type specifiers D:\Parichay\DesktopSearch\UpdateDlg.cpp(181) : error C2065: 'm_dCreatelg' : undeclared identifier D:\Parichay\DesktopSearch\UpdateDlg.cpp(181) : error C2227: left of '->DoModal' must point to class/struct/union Generating Code... Error executing cl.exe. DesktopSearch.exe - 14 error(s), 0 warning(s)
Do you see MSDN for these errors? it is some helpful to you