Dear All,
1. Can I use c code in MFC?
2. What is the code if i create an "open" button and click it to open files in windows?
3. How can I recall other person's function in MFC?
Thank you
Dear All,
1. Can I use c code in MFC?
2. What is the code if i create an "open" button and click it to open files in windows?
3. How can I recall other person's function in MFC?
Thank you
Last edited by lwong; 10-29-2003 at 06:45 AM.
If you want to learn MFC, I suggest you get a good book. Perhaps even learning raw Win32 programming first.
Since MFC is a C++ library, and C++ is a superset of C, you can use C code within an MFC based application.
gg
Of course you can call C from MFC- MFC is just a class based interface to the WinAPI.
>>you can use C code within an MFC based application.
in most cases you have to prefix the function with :: to use the WIN32 API C version of the function.
>>2. What is the code if i create an "open" button and click it to open files in windows?Code://MFC Messagebox AfxGetMainWnd()->MessageBox( "Some Error occured" , "MyApps Error" , MB_OK | MB_ICONERROR); //WIN32 API Messagebox in a MFC app ::MessageBox(hWnd,"Some Error occured" , "MyApps Error" , MB_OK | MB_ICONERROR);
Too many variations to tell you. Try, post if you have problems.
>>3. How can I recall other person's function in MFC?
If the function is not a standard MFC function;
Got the other persons code, a library or DLL?
Else AFAIK no way to do so.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill