Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LRESULT CALLBACK WndProc(HWND hWindow, UINT msg, WPARAM wParam, LPARAM lParam)
- {
- // Initialize via wrapper, else route to engine
- switch (msg)
- {
- case WM_CREATE:
- return GEN::Wrapper::GetWrapper()->HandleEvent(hWindow, msg, wParam, lParam);
- break;
- default:
- return GEN::Wrapper::GetEngine()->HandleEvent(hWindow, msg, wParam, lParam) // DefWndProc called from this HandleEvent
- }
- }
- class WrapperInterface
- {
- public:
- static std::tr1::shared_ptr<WrapperInterface> // factory function
- create_Wrapper(...); // returns pImpl
- // ... Pure virtuals here
- };
- std::tr1::shared_ptr<WrapperInterface> WrapperInterface::create_Wrapper(...)
- {
- return std::tr1::shared_ptr<WrapperInterface>(new Wrapper(...));
- }
- std::tr1::shared_ptr<WrapperInterface>
- Wrapper(WrapperInterface::create(...));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement