Click here to Skip to main content
15,918,193 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Evaluation program Pin
Christian Graus19-Sep-02 21:56
protectorChristian Graus19-Sep-02 21:56 
GeneralRe: Evaluation program Pin
Chris Losinger19-Sep-02 17:34
professionalChris Losinger19-Sep-02 17:34 
GeneralRe: Evaluation program Pin
Nish Nishant19-Sep-02 18:34
sitebuilderNish Nishant19-Sep-02 18:34 
GeneralA question about pointer of function. Pin
George Ma19-Sep-02 17:16
George Ma19-Sep-02 17:16 
GeneralRe: A question about pointer of function. Pin
Chris Losinger19-Sep-02 17:22
professionalChris Losinger19-Sep-02 17:22 
GeneralRe: A question about pointer of function. Pin
George Ma20-Sep-02 2:29
George Ma20-Sep-02 2:29 
Questionhelp dl issu? Pin
imran_rafique19-Sep-02 16:35
imran_rafique19-Sep-02 16:35 
AnswerRe: help dl issu? Pin
Chris Losinger19-Sep-02 17:28
professionalChris Losinger19-Sep-02 17:28 
declare a typedef somewhere

typedef void * (CALLBACK* MyCallbackFunctionType)(int a, int b);


in your DLL, have a function that accepts a function pointer as a parameter:

void	SetCallback(MyCallbackFunctionType pCallback)
{
   // do the callback 
   if (pCallback)
       pCallback(a, b);
}


define the callback function in your app:
void CALLBACK MyCallbackFunction(int a, int b)
{
  int c = a + b;
  TRACE("%d+%d %d\n", a,b,c);
}


in your app:
// tell the DLL which function to call
SetCallback(MyCallbackFunction);


-c


As always, it's bread and circuses. And while bread is down right now, circuses are way up.

Questionhow to?( DLL) Pin
imran_rafique19-Sep-02 15:52
imran_rafique19-Sep-02 15:52 
AnswerRe: how to?( DLL) Pin
Paul M Watt19-Sep-02 19:04
mentorPaul M Watt19-Sep-02 19:04 
QuestionCEditView -> CEdit::ReplaceSel() leaks GDI Objects? Pin
scott sanders19-Sep-02 15:03
scott sanders19-Sep-02 15:03 
AnswerRe: CEditView -> CEdit::ReplaceSel() leaks GDI Objects? Pin
Hans Ruck19-Sep-02 21:41
Hans Ruck19-Sep-02 21:41 
GeneralRe: CEditView -> CEdit::ReplaceSel() leaks GDI Objects? Pin
scott sanders20-Sep-02 6:59
scott sanders20-Sep-02 6:59 
GeneralRe: CEditView -> CEdit::ReplaceSel() leaks GDI Objects? Pin
Hans Ruck20-Sep-02 7:13
Hans Ruck20-Sep-02 7:13 
Generalconsole vs windows Pin
xai19-Sep-02 14:58
xai19-Sep-02 14:58 
GeneralRe: console vs windows Pin
Christian Graus19-Sep-02 15:40
protectorChristian Graus19-Sep-02 15:40 
GeneralRe: console vs windows Pin
xai21-Sep-02 5:26
xai21-Sep-02 5:26 
Questionmechanism for the a dll to send back periodic info? Pin
ns19-Sep-02 12:02
ns19-Sep-02 12:02 
AnswerRe: mechanism for the a dll to send back periodic info? Pin
Chris Losinger19-Sep-02 12:55
professionalChris Losinger19-Sep-02 12:55 
GeneralRe: mechanism for the a dll to send back periodic info? Pin
ns20-Sep-02 1:32
ns20-Sep-02 1:32 
AnswerRe: mechanism for the a dll to send back periodic info? Pin
Paul M Watt19-Sep-02 19:31
mentorPaul M Watt19-Sep-02 19:31 
GeneralGUI with Visual C Pin
E. Bonizzoni19-Sep-02 12:03
E. Bonizzoni19-Sep-02 12:03 
GeneralRe: GUI with Visual C Pin
Christian Graus19-Sep-02 13:11
protectorChristian Graus19-Sep-02 13:11 
GeneralRe: GUI with Visual C Pin
Paul M Watt19-Sep-02 19:39
mentorPaul M Watt19-Sep-02 19:39 
GeneralChanging the mask color for the IDR_MAINFRAME icon Pin
monrobot1319-Sep-02 11:14
monrobot1319-Sep-02 11:14 

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.