This seems like it should be pretty straightforward. I have my class:
class Simple
{
public:
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA
// Header
class Foo
{
public:
Foo();
~Foo();
static LRESULT CALLBACK WinProc(HWND, UINT, WPARAM, LPARAM);
private:
LRESULT CALLBACK MyWinProc(HWND, UINT, WPARAM, LPARAM);
static Foo *m_pInstance;
}
// Implementation
#include "Foo.h"
Foo * Foo::m_pInstance = NULL;
Foo::Foo()
{
m_pInstance = this;
}
Foo::~Foo()
{
}
LRESULT CALLBACK Foo::WinProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
return m_pInstance->MyWinProc(hWnd, message, wParam, lParam);
}
LRESULT CALLBACK Foo::MyWinProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
return DefWindowProc(hWnd, message, wParam, lParam);
}