@Antonshka
Можно без readProcessMemory так
template <typename T> requires EventConnectConcept<T>
VOID Event::connect(EventStatus(T::* method)(EventMessage*), T* listener, BOOL mustSkipIfDuplicate) {
...
CONST auto* CONST methodAddress = *reinterpret_cast<VOID**>(&method);
...
}
class MyWindow : public Window {
MyWindow () :
openSomething(new SButton(TRUE, 0, 0, L"Open Something", 10, 10, 100, 30, this))
{
openSomething->onLButtonUp->connect(&MyWindow ::someMethod, this);
...
}
...
private:
EventStatus someMethod(EventMessage* message);
private:
SButton* CONST openSomething{};
}