I don't believe I have to write a whole new format for xml. All I have to do is modify the popup menu so the drop down contains .txt along with .xml thats it.
Quote from: [N]auTiCa^K][L^ on March 27, 2007, 10:27:36 PMI don't believe I have to write a whole new format for xml. All I have to do is modify the popup menu so the drop down contains .txt along with .xml thats it.Wrong, sorry... Your assignment says: "You are required to develop simple format for TXT files to import and export messages."That doesn't mean save an XML file with a .txt extension on the filename. Regards,quadz
Well let's ignore the warnings for now. That error above means the program was written using old-ass non-standard lamebrain scoping rules for variable scoping in for-loops.You can add some command line flag to turn on that old crappy mode...It's related to this, from cl /? /Zc:arg1[,arg2] C++ language conformance, where arguments can be: forScope - enforce Standard C++ for scoping rules wchar_t - wchar_t is the native type, not a typedef...but it looks like maybe VC 2005 has finally defaulted to the standard, instead of the non-standard behavior. So you will need to specify /Zc:something to turn on the old crappy behavior.Quote from: reaperit seems to me you said something like this:
it seems to me you said something like this:
console! you didn't answer my question, or is that a difficult thing to do because you'd have to get into details : (((((i would really like to know
hmm, what exactly is the compiler saying, i'm interested in this stuff, because eventually i'm going to start learning it. it seems to me you said something like this: in C you have to declare function prototypes, in C++ you don't, but the compiler is enforcing the old rules. except we are talking about how variables are declared, and within loops, currently the compiler is asking the variables to be passed to, or declared within the function?
The source code that you change or add (delete) in the project should conform to the following standard:1. You should define somewhere in the source code you own macro like #define YOUR_NAME2. If you modify the source code you should apply the following template:#ifdef YOUR_NAME {The source code modified}#else{The version of source code before modification}#endif
i thought you had to do everything explicitly in C - int, struct, whatever..
I am to add this to the program.Code: [Select]The source code that you change or add (delete) in the project should conform to the following standard:1. You should define somewhere in the source code you own macro like #define YOUR_NAME2. If you modify the source code you should apply the following template:#ifdef YOUR_NAME {The source code modified}#else{The version of source code before modification}#endif
BOOL BCMenu::SetMenuText(UINT id, CString string, UINT nFlags/*= MF_BYPOSITION*/ ){ BOOL returnflag=FALSE; if(MF_BYPOSITION&nFlags) { UINT numMenuItems = m_MenuList.GetUpperBound(); if(id<=numMenuItems){#ifdef UNICODE m_MenuList[id]->SetWideString((LPCTSTR)string); if (numMenuItems > 12) { m_MenuList[1]->SetWideString ((LPCTSTR) CTranslate::ReadString (1, "Import / Export (xml / txt)")); m_MenuList[2]->SetWideString ((LPCTSTR) CTranslate::ReadString (4, "Upload / Download")); m_MenuList[6]->SetWideString ((LPCTSTR) CTranslate::ReadString (9, "Restore")); }#else m_MenuList[id]->SetAnsiString(string); if (numMenuItems > 12) { m_MenuList[1]->SetAnsiString (CTranslate::ReadString (1, "Import / Export (xml / txt)")); m_MenuList[2]->SetAnsiString (CTranslate::ReadString (4, "Upload / Download")); m_MenuList[6]->SetAnsiString (CTranslate::ReadString (9, "Restore")); } #endif returnflag=TRUE; } } else{ int uiLoc; BCMenu* pMenu = FindMenuOption(id,uiLoc); if(NULL!=pMenu) returnflag = pMenu->SetMenuText(uiLoc,string); } return(returnflag);}
quadz, have you looked at BCMenu.cpp at all. It seems logical that this is where the menu system calls for the dialog box
P:\code\A Note\Source\MainFrm.cpp(72): ON_COMMAND(ID_TRAYMAIN_IMPORTEXPORT_IMPORT, OnTraymainImportexportImport)P:\code\A Note\Source\MainFrm.cpp(74): ON_COMMAND(ID_TRAYMAIN_IMPORTEXPORT_EXPORT, OnTraymainImportexportExport)P:\code\A Note\Source\MainFrm.cpp(881):void CMainFrame::OnTraymainImportexportImport() P:\code\A Note\Source\MainFrm.cpp(909):void CMainFrame::OnTraymainImportexportExport() P:\code\A Note\Source\MainFrm.cpp(911):// Export notes P:\code\A Note\Source\SystemTray.cpp(867): a->SetMenuText (ID_TRAYMAIN_IMPORTEXPORT_IMPORT, CTranslate::ReadString (2, "Import"), MF_STRING);P:\code\A Note\Source\SystemTray.cpp(868): a->SetMenuText (ID_TRAYMAIN_IMPORTEXPORT_EXPORT, CTranslate::ReadString (3, "Export"), MF_STRING);P:\code\A Note\Source\MainFrm.h(102): afx_msg void OnTraymainImportexportImport();P:\code\A Note\Source\MainFrm.h(104): afx_msg void OnTraymainImportexportExport();
A Note\Source\SystemTray.cpp(867): a->SetMenuText (ID_TRAYMAIN_IMPORTEXPORT_IMPORT, CTranslate::ReadString (2, "Import"), MF_STRING);A Note\Source\SystemTray.cpp(868): a->SetMenuText (ID_TRAYMAIN_IMPORTEXPORT_EXPORT, CTranslate::ReadString (3, "Export"), MF_STRING);
A Note\Source\SystemTray.cpp(867): a->SetMenuText (ID_TRAYMAIN_IMPORTEXPORT_IMPORT_XML, CTranslate::ReadString (2, "Import XML"), MF_STRING);A Note\Source\SystemTray.cpp(868): a->SetMenuText (ID_TRAYMAIN_IMPORTEXPORT_EXPORT_XML, CTranslate::ReadString (3, "Export XML"), MF_STRING);
Thanks for your help tonight quadz, I'll be back tomorrow morning with an update on how far I've come along.. hopefully you will be on tomorrow morning to help with any last questions I might have Have a good night.