Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Call Class Members from Interrupt Routine Pin
Andy20229-Feb-12 6:10
Andy20229-Feb-12 6:10 
GeneralRe: Call Class Members from Interrupt Routine Pin
Erudite_Eric1-Mar-12 22:39
Erudite_Eric1-Mar-12 22:39 
GeneralRe: Call Class Members from Interrupt Routine Pin
Andy2022-Mar-12 0:15
Andy2022-Mar-12 0:15 
GeneralRe: Call Class Members from Interrupt Routine Pin
Erudite_Eric4-Mar-12 21:29
Erudite_Eric4-Mar-12 21:29 
GeneralRe: Call Class Members from Interrupt Routine Pin
Jochen Arndt29-Feb-12 6:00
professionalJochen Arndt29-Feb-12 6:00 
GeneralRe: Call Class Members from Interrupt Routine Pin
Erudite_Eric1-Mar-12 22:31
Erudite_Eric1-Mar-12 22:31 
GeneralRe: Call Class Members from Interrupt Routine Pin
enhzflep1-Mar-12 22:41
enhzflep1-Mar-12 22:41 
AnswerRe: Call Class Members from Interrupt Routine Pin
JackDingler2-Mar-12 7:41
JackDingler2-Mar-12 7:41 
In a callback, you can pass a static member function, and use a class pointer as the first parameter.

When you register the callback, pass it the address of the static function and for the void * data member, pass the address of the object.

C++
class CTest1
{
public:
    // This is your callback routine
    static void _DigitalInt(void * pData);

public:
    // This is the method that does the work.
    void DigitalInt(void);
};

void CTest1::_DigitalInt(void * pData)
{
    ((CTest1 *) pData)->DigitalInt();
}

void CTest1::DigitalInt(void)
{
// Do Stuff here.
}

Questionview object in dialog when can be used Pin
appollosputnik28-Feb-12 20:43
appollosputnik28-Feb-12 20:43 
AnswerRe: view object in dialog when can be used Pin
CPallini28-Feb-12 21:42
mveCPallini28-Feb-12 21:42 
GeneralRe: view object in dialog when can be used Pin
appollosputnik28-Feb-12 22:44
appollosputnik28-Feb-12 22:44 
GeneralRe: view object in dialog when can be used Pin
CPallini29-Feb-12 0:17
mveCPallini29-Feb-12 0:17 
QuestionHow to insert a "#" to some lines ? Pin
Faez Shingeri28-Feb-12 19:52
Faez Shingeri28-Feb-12 19:52 
AnswerRe: How to insert a "#" to some lines ? Pin
wangningyu28-Feb-12 21:21
wangningyu28-Feb-12 21:21 
GeneralRe: How to insert a "#" to some lines ? Pin
Faez Shingeri28-Feb-12 23:37
Faez Shingeri28-Feb-12 23:37 
QuestionRe: How to insert a "#" to some lines ? Pin
David Crow29-Feb-12 2:46
David Crow29-Feb-12 2:46 
AnswerRe: How to insert a "#" to some lines ? Pin
Faez Shingeri29-Feb-12 18:12
Faez Shingeri29-Feb-12 18:12 
AnswerRe: How to insert a "#" to some lines ? Pin
David Crow1-Mar-12 3:03
David Crow1-Mar-12 3:03 
GeneralRe: How to insert a "#" to some lines ? Pin
Faez Shingeri1-Mar-12 22:41
Faez Shingeri1-Mar-12 22:41 
GeneralRe: How to insert a "#" to some lines ? Pin
David Crow2-Mar-12 2:39
David Crow2-Mar-12 2:39 
GeneralRe: How to insert a "#" to some lines ? Pin
Faez Shingeri5-Mar-12 0:37
Faez Shingeri5-Mar-12 0:37 
GeneralRe: How to insert a "#" to some lines ? Pin
Faez Shingeri5-Mar-12 19:37
Faez Shingeri5-Mar-12 19:37 
QuestionRe: How to insert a "#" to some lines ? Pin
David Crow6-Mar-12 2:23
David Crow6-Mar-12 2:23 
AnswerRe: How to insert a "#" to some lines ? Pin
Faez Shingeri6-Mar-12 23:53
Faez Shingeri6-Mar-12 23:53 
AnswerRe: How to insert a "#" to some lines ? Pin
CPallini28-Feb-12 21:39
mveCPallini28-Feb-12 21:39 

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.