Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can make the function static, and call it accordingly:

class c
{
public:
    static void on_trackbar(int, void*)
    {

    }
};

// ...

createTrackbar("Foo", "Bar", &some_variable, another_variable, c::on_trackbar);

You can make the function static, and call it accordingly:

class c
{
public:
    static void on_trackbar(int, void*)
    {

    }
};

// ...

createTrackbar("Foo", "Bar", &some_variable, another_variable, c::on_trackbar);

If this code does not solve your problem, then please let me know. On the other hand, if this code does solve your problem, then please upvote my answer and mark it as correct. Thank you.