Click here to Skip to main content
15,913,292 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: External File String Search Pin
JWood25-Mar-04 16:56
JWood25-Mar-04 16:56 
GeneralPassing data to a DLL Pin
Steve Messer25-Mar-04 12:18
Steve Messer25-Mar-04 12:18 
GeneralRe: Passing data to a DLL Pin
Prakash Nadar25-Mar-04 14:51
Prakash Nadar25-Mar-04 14:51 
GeneralRe: Passing data to a DLL Pin
Steve Messer25-Mar-04 15:15
Steve Messer25-Mar-04 15:15 
GeneralRe: Passing data to a DLL Pin
Prakash Nadar25-Mar-04 17:04
Prakash Nadar25-Mar-04 17:04 
GeneralRe: Passing data to a DLL Pin
Ryan Binns25-Mar-04 17:21
Ryan Binns25-Mar-04 17:21 
GeneralRe: Passing data to a DLL Pin
Steve Messer25-Mar-04 18:33
Steve Messer25-Mar-04 18:33 
GeneralRe: Passing data to a DLL Pin
Roger Allen26-Mar-04 2:10
Roger Allen26-Mar-04 2:10 
Declare a pure virtual class that your dialog etc will inherit from. Then you pass a pointer to your dialog across to the dll and it calls the functions it required on this calss object:

// this is in a header file shared by the EXE and the DLL projects
class MyCallBacks
{
 virtual void Callback1(parameters) = 0;
 virtual bool Callback2(parameters) = 0;
}

// this is in your EXE
CMyDialog : public CDialog, public MyCallbacks
{
 // implementations of the callback functions
 void Callback1(parameters);
 bool Callback2(parameters);
}


So when you init your DLL, pass a MyCallBacks* pointer in the structure across. Then in the DLL, if you need to do a certain actio, you would do:

// this is in your DLL
if (m_pCallback != NULL)
{
m_pCallback->Callback1(parameters);
}


Hopefully this makes some sense!


Roger Allen - Sonork 100.10016
Strong Sad:
Clever I am? Next to no one.
Undiscovered and soggy.
Look up. Look down. They're around.
Probably laughing. Still, bright, watery.
Listed among the top. Ten.
Nine. Late night. Early morn.
Early mourn. Now I sleep.

GeneralRe: Passing data to a DLL Pin
Steve Messer26-Mar-04 5:02
Steve Messer26-Mar-04 5:02 
QuestionHow to make a default button at Run Time Pin
Touseef Afzal25-Mar-04 10:42
Touseef Afzal25-Mar-04 10:42 
AnswerRe: How to make a default button at Run Time Pin
Robert A. T. Káldy25-Mar-04 11:00
Robert A. T. Káldy25-Mar-04 11:00 
GeneralRe: How to make a default button at Run Time Pin
Touseef Afzal27-Mar-04 4:25
Touseef Afzal27-Mar-04 4:25 
GeneralRe: How to make a default button at Run Time Pin
Steve S29-Mar-04 0:56
Steve S29-Mar-04 0:56 
GeneralDirectSound question Pin
pankajdaga25-Mar-04 10:41
pankajdaga25-Mar-04 10:41 
GeneralRe: DirectSound question Pin
Ryan Binns25-Mar-04 17:28
Ryan Binns25-Mar-04 17:28 
GeneralRe: DirectSound question Pin
pankajdaga25-Mar-04 20:07
pankajdaga25-Mar-04 20:07 
GeneralSetFocus in EditControl Pin
xzigax25-Mar-04 9:27
xzigax25-Mar-04 9:27 
GeneralRe: SetFocus in EditControl Pin
Hesham Amin25-Mar-04 9:51
Hesham Amin25-Mar-04 9:51 
QuestionHow to get the handle of a control in properties sheet. Pin
bin892225-Mar-04 9:18
bin892225-Mar-04 9:18 
AnswerRe: How to get the handle of a control in properties sheet. Pin
David Crow25-Mar-04 10:15
David Crow25-Mar-04 10:15 
AnswerRe: How to get the handle of a control in properties sheet. Pin
Prakash Nadar25-Mar-04 19:31
Prakash Nadar25-Mar-04 19:31 
GeneralThe value returned is NULL Pin
bin892226-Mar-04 5:05
bin892226-Mar-04 5:05 
GeneralStatus bar gripper Pin
sschilachi25-Mar-04 8:50
sschilachi25-Mar-04 8:50 
QuestionDialog Help Needed? Pin
modeonetwo25-Mar-04 6:51
modeonetwo25-Mar-04 6:51 
AnswerRe: Dialog Help Needed? Pin
David Crow25-Mar-04 8:27
David Crow25-Mar-04 8: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.