I have a question regarding design of an application in an OOP sense...
In the case that I am creating a real time windows app (either a game or a graphical simulation) - I have a class which is the application class, CApp.
Now most of the action occurs in the windows procecure, in this case AppWndProc(). And I am unsure how to make the Graphics class (which is probably going to be called frequently in response the WM_PAINT messages) communicate with the rest of the program.
Now, my actual question is - what would be the best way to have the graphical part of the app interact with the windows procedure contained within the main app - would it be best to create an instance of the class as a private member of the CApp class? Or is it best to keep this object seperate?
Thanks
Code:class CApp { private: CGraphics cg; public: LRESULT CALLBACK AppWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) };