In Window95 a screen saver can be previewed in display property dialog . How can the
application knows whether it runs in full screen mode or in the preview mode . If the the
first parameter is ‘c’ you need to run
config . if it is ‘p’ you need to create a
preview window . If it is ‘s’ you need to
create full screen window .
I write the three base class which are for the common usage .
- One is derived from CWinApp , it(CSSApp) will judge whether runs in
full screen mode or in preview mode and call the proper member function to start task .
- The other two are derived from CWnd , one(CFullWnd) is full screen
window the other(CSmallWnd) is preview window.
There are some virtual member function in the CSSApp .
- InitInstance(…) It will judge the running mode and call the proper
function (DoConfig, DoSmall or DoFull) .Your class derived from CSSApp must call it in
- DoConfig(…) You must override it to display your configuration dialog
- DoSmall(…) You must override it to create your preview mode window .
You need create a child whose parent window is CWnd* pParent =
- DoFull(…) You must override it to display the full screen window .
The class CFullWnd and CSmallWnd can be the base
class of your full screen window class and preview window class . When the window is
created it will generate a timer . The thing you need to do is overriding the OnTimer(…)