struct index_name
{
char name[21];
unsigned int recnum;
};
As C++ is not supposed to handle Windows form, should I use C# insteadbeside of windows form, it is also possible to use an mfc application which might be easier.
How to call one mfc Application, from one C# Form project?that doesn't make sense. mfc (Microsoft foundation classes) is an alternative to windows form in c++. it doesn't need .net what is an advantage if you don't have much experience with gui programming. it is an disadvantage if you already made form programs with c# Â or vb. in either case it is the fastest way for the task to read from binary files and show the records, since you can use many of the current structures and code directly without porting it to a new language.
that doesn't make sense. mfc (Microsoft foundation classes) is an alternative to windows form in c++
generally, an MDI application has an application class derived from CWinApp, a main frame class (linked to resource id IDR_MAINFRAME), and for each document type supported at least one triple of a document class derived from CDocument, a frame class derived from CMDIChildWnd, and a view class derived from CView (or CScrollView or CFormView, more ...). you could add more views by defining another triple for the same document class and the same frame class. this normally was done in the application class (mfcapp.cpp) in the Init_Instance member function. if you look into the code you will see a CMDIDocTemplate class used which is a helper for to creating such a triple of document, frame and view.
Do you mean  I should start with ClassView.cpp and MFCApp.cpp?as far as i know your requirements, an mdi app is an overkill. my recommendation is (and was) to create a new mfc project which is dialog-based. the framework consists only of two classes then: an application class derived from CWinApp and a dialog class derived from CDialog.
Error 1 error C2471: cannot update program database 'f:\mfcapplication1\mfcapplication1\debug\vc120.idb' f:\mfcapplication1\mfcapplication1\stdafx.cpp 9 1 MFCApplication1
Warning 2 warning D9028: minimal rebuild failure, reverting to normal build f:\MFCApplication1\MFCApplication1\cl MFCApplication1
error C2471: cannot update program database 'f:\mfcapplication1\mfcapplication1\ debug\vc12 0.idb'
classview.cpp was only in sdi and mdi mfc application. it is a 'sample' view to be 'docked' into the main frame to visualize some arbitrary data in a tree.
the only include it needs is binaryfile.h. then copy the functions from readbinaryfile.cpp to the new file.
Is it to copy all codes from readbinaryfile.cpp into the current project, other than your advice to .h file?no. because you may need to include the h file from more than one cpp file in the mfc project. if the h file contains implementations of functions, multiple inclusions from different cpp file would lead to an error since the linker would complain about duplicate 'symbols'. you could try to make the functions 'inline' or put a class around them, what also would help, but in my opinion it is not worth the efforts.
How does BinaryFile.cpp interact with MFCApplication2.cpp?i don't know. you never told me what you intend to do with the form project.
What is the purpose of BinaryFile.cpp?it provides the structures and access functions to the files created by savebibaryfile and queried by readbinaryfile.
the binaryfile.h only contains a "declaration" (prototype) of the function what simply is the return type, the function name and the arguments closed by a semicolon
you may add radio buttons for
Â
index number
Â
index name
Â
record structure
by those the User may chose which kind of binary data they would like to look for. name the id's of the 3 radio buttons IDC_RAD_NUMBER, IDC_RAD_NAME, IDC_RAD_RECORD. the idc numbers will be stored in resource.h. make sure that the 3 numbers are contiguous (what is automatical the case if you define them straight one after the other.
is there any example to that?it is rather intuitive to use. if you have chosen a control on your form you may type ALT+ENTER to get the properties window for the control. if you got problems using it you may look for a mfc tutorial or youtube sample.
C++.net does work with Windows Forms. Â (Not quite the same as classical, unmanaged, C++ which I guess is what you are thinking of).