Click here to Skip to main content
16,007,126 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCTabCtrl Pin
Rickard Andersson2027-Mar-02 9:26
Rickard Andersson2027-Mar-02 9:26 
GeneralRe: CTabCtrl Pin
Michael P Butler27-Mar-02 9:33
Michael P Butler27-Mar-02 9:33 
Generalintegers Pin
27-Mar-02 7:35
suss27-Mar-02 7:35 
GeneralRe: integers Pin
Jon Sagara27-Mar-02 8:19
Jon Sagara27-Mar-02 8:19 
GeneralRe: integers Pin
Tim Deveaux27-Mar-02 8:24
Tim Deveaux27-Mar-02 8:24 
QuestionPass class member function as paramter? Pin
Todd Smith27-Mar-02 7:22
Todd Smith27-Mar-02 7:22 
AnswerRe: Pass class member function as paramter? Pin
Tim Deveaux27-Mar-02 8:27
Tim Deveaux27-Mar-02 8:27 
GeneralRe: Pass class member function as paramter? Pin
Todd Smith28-Mar-02 8:02
Todd Smith28-Mar-02 8:02 
That landed me in boost territory. It was a little daunting at first but here's what I came up with.

#include "stdafx.h"
#include <boost bind.hpp="">

#include "debugstr.h"

class CTest
{
public:
void Test(const char* str)
{
printf("member function: %s", str);
}
};

template <class f="">
void foo(F f)
{
for (int i=0; i<10; i++)
{
char buf[128] = {0};

sprintf(buf, "test %i\n", i);

f(buf);
}
}

void Test(const char* str)
{
printf("global function: %s", str);
}

int main(int argc, char* argv[])
{
CTest test;

foo(boost::bind(&CTest::Test, boost::ref(test), _1));
foo(boost::bind(Test, _1));

return 0;
}


Todd Smith
CPUA 0x007 ... shaken not stirred

AnswerRe: Pass class member function as paramter? Pin
soptest27-Mar-02 8:51
soptest27-Mar-02 8:51 
AnswerRe: Pass class member function as paramter? Pin
Jim Crafton27-Mar-02 10:50
Jim Crafton27-Mar-02 10:50 
GeneralHistory list in browser window Pin
Aaron Schaefer27-Mar-02 6:24
Aaron Schaefer27-Mar-02 6:24 
Generalsending keystrokes to window Pin
vins27-Mar-02 5:14
vins27-Mar-02 5:14 
GeneralRe: sending keystrokes to window Pin
Tim Deveaux27-Mar-02 6:12
Tim Deveaux27-Mar-02 6:12 
GeneralRe: sending keystrokes to window Pin
vins27-Mar-02 6:22
vins27-Mar-02 6:22 
GeneralRe: sending keystrokes to window Pin
Tim Deveaux27-Mar-02 7:41
Tim Deveaux27-Mar-02 7:41 
GeneralRe: sending keystrokes to window Pin
vins27-Mar-02 8:16
vins27-Mar-02 8:16 
QuestionHow do I determine what functions a dll are exporting? Pin
Tommy Svensson27-Mar-02 5:03
Tommy Svensson27-Mar-02 5:03 
AnswerRe: How do I determine what functions a dll are exporting? Pin
Chris Losinger27-Mar-02 5:27
professionalChris Losinger27-Mar-02 5:27 
GeneralRe: How do I determine what functions a dll are exporting? Pin
Tommy Svensson27-Mar-02 6:08
Tommy Svensson27-Mar-02 6:08 
AnswerRe: How do I determine what functions a dll are exporting? Pin
Paul M Watt27-Mar-02 5:48
mentorPaul M Watt27-Mar-02 5:48 
GeneralRe: How do I determine what functions a dll are exporting? Pin
Tommy Svensson27-Mar-02 6:16
Tommy Svensson27-Mar-02 6:16 
GeneralRe: How do I determine what functions a dll are exporting? Pin
Tommy Svensson27-Mar-02 6:36
Tommy Svensson27-Mar-02 6:36 
GeneralRe: How do I determine what functions a dll are exporting? Pin
Paul M Watt27-Mar-02 9:03
mentorPaul M Watt27-Mar-02 9:03 
GeneralRe: How do I determine what functions a dll are exporting? Pin
Tommy Svensson1-Apr-02 21:49
Tommy Svensson1-Apr-02 21:49 
GeneralRe: How do I determine what functions a dll are exporting? Pin
Tomasz Sowinski27-Mar-02 10:24
Tomasz Sowinski27-Mar-02 10:24 

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.