Click here to Skip to main content
15,888,968 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get the CEdit box to update Pin
FredrickNorge17-Dec-06 7:05
FredrickNorge17-Dec-06 7:05 
Questionpointers to functions Pin
emrah.a17-Dec-06 3:58
emrah.a17-Dec-06 3:58 
AnswerRe: pointers to functions Pin
Chris Losinger17-Dec-06 4:43
professionalChris Losinger17-Dec-06 4:43 
AnswerRe: pointers to functions Pin
prasad_som17-Dec-06 18:22
prasad_som17-Dec-06 18:22 
GeneralNeed Article Co-Author Pin
Jeffrey Walton17-Dec-06 3:09
Jeffrey Walton17-Dec-06 3:09 
QuestionDouble buffering in a wmp Visualization Pin
ceejeeb17-Dec-06 3:08
ceejeeb17-Dec-06 3:08 
QuestionBest way to interact with a C program Pin
Luís Brás17-Dec-06 1:59
Luís Brás17-Dec-06 1:59 
AnswerRe: Best way to interact with a C program Pin
Mark Salsbery17-Dec-06 8:58
Mark Salsbery17-Dec-06 8:58 
Luís Brás wrote:
I think have three alternatives, 1) run the exe and work with pipe's, 2) put everything in extern C code or 3) create a simple c++ class that have all the C subroutines.


It sounds like the only difference between your MFC code and your C code is that the C code has
no user interface.

Any of your three methods will work.

If you need the C code to run in a separate process (exe) then you'll need to go with method 1.
Having to communicate with another process adds a level of complexity, obviously.

If it's ok to have the C code linked to your MFC app then method 2 or 3 will work. The code
could be in a DLL or compiled right into your MFC app.

If you are developing your C code from the start (it hasn't already been written) then method 3 is
probably the way to go. It shouldn't take any longer than any other method - you still have to
write the code and check for errors at runtime as needed, regardless of which method you use.

There's no problem mixing C code with C++. You do it all the time using MFC and/or the C runtime
(CRT). Calling malloc is fine. Remember to free memory when you're done with it Smile | :)
QuestionSend enter key? Pin
Larsson17-Dec-06 1:35
Larsson17-Dec-06 1:35 
AnswerRe: Send enter key? Pin
Daniel Kanev17-Dec-06 2:48
Daniel Kanev17-Dec-06 2:48 
QuestionDLL Coding Dilemma... Pin
Shy Agam16-Dec-06 22:52
Shy Agam16-Dec-06 22:52 
AnswerRe: DLL Coding Dilemma... Pin
peterchen17-Dec-06 0:04
peterchen17-Dec-06 0:04 
GeneralRe: DLL Coding Dilemma... Pin
Shy Agam17-Dec-06 0:18
Shy Agam17-Dec-06 0:18 
GeneralRe: DLL Coding Dilemma... Pin
peterchen17-Dec-06 0:46
peterchen17-Dec-06 0:46 
GeneralRe: DLL Coding Dilemma... Pin
Shy Agam17-Dec-06 1:56
Shy Agam17-Dec-06 1:56 
QuestionHow to save HBITMAP into *.png?? Pin
314159265316-Dec-06 18:05
314159265316-Dec-06 18:05 
AnswerRe: How to save HBITMAP into *.png?? Pin
Hadi Dayvary16-Dec-06 18:41
professionalHadi Dayvary16-Dec-06 18:41 
QuestionRom loaders. Pin
asp.netProgrammer16-Dec-06 17:26
asp.netProgrammer16-Dec-06 17:26 
AnswerRe: Rom loaders. Pin
Jeffrey Walton17-Dec-06 3:31
Jeffrey Walton17-Dec-06 3:31 
Questionregistry clearners Pin
locoone16-Dec-06 16:21
locoone16-Dec-06 16:21 
QuestionON_WM_MOUSEMOVE in CFrameWnd Pin
gokings16-Dec-06 16:08
gokings16-Dec-06 16:08 
AnswerRe: ON_WM_MOUSEMOVE in CFrameWnd Pin
includeh1016-Dec-06 20:17
includeh1016-Dec-06 20:17 
QuestionAuto Load Exployer with auto-loading of a specified file Pin
Larry Mills Sr16-Dec-06 8:02
Larry Mills Sr16-Dec-06 8:02 
AnswerRe: Auto Load Exployer with auto-loading of a specified file Pin
Luc Pattyn16-Dec-06 15:15
sitebuilderLuc Pattyn16-Dec-06 15:15 
GeneralRe: Auto Load Exployer with auto-loading of a specified file Pin
Larry Mills Sr17-Dec-06 13:27
Larry Mills Sr17-Dec-06 13:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.