SCWindow 
 
Class Name  Derived From  Styles  Signals 
SCWindow CPFrameWindow FF_NONE  
FF_THIN  
FF_THICK  
PSF_SIZED     
PSF_FOCUS_RECEIVED
PSF_FOCUS_LOST   
PSF_KEY_RECEIVED 
 
SCWindow is an extension of the CPFrameWindow that adds support for events.  Instead 
of handling user input like pen and keyboard events in the Message() method, 
SCWindow extends handling of events with the following event handlers: 
 
•  OnLButtonDownEvent(const SCEvent& e)  
•  OnLButtonUpEvent(const SCEvent& e)  
•  OnMouseMoveEvent(const SCEvent& e)  
•  OnKeyEvent(const SCEvent& e)  
•  OnExtendedKeyEvent(const SCEvent& e) 
 
These methods are virtual. If you derive a sub-class from SCWindow you can create your 
own event handlers. Of course you can still decide to handle these events directly in the 
Message method if you'd like. If you handle these events in the Message method then the 
event handlers listed above will never be called. 
 
The typical usage for SCWindow is to first derive your own CPModuleWindow subclass, 
and then create another window class like SCWindow or SCWindowWithMode to sit 
inside your CPModuleWindow class. The CPModuleWindow class can manage scrolling 
of the SCWindow class while the SCWindow or SCWindowWithMode class can manage 
events or modes. 
 
Here is an example that creates a SCWindow inside a CPModuleWindow: 
 
SCWindow *sc = new SCWindow(Rect); 
swin->Add(sc); 
SCWindowWithMode 
 
Class Name  Derived From  Styles  Signals 
SCWindowWithMode SCWindow  FF_NONE  
FF_THIN  
FF_THICK  
PSF_SIZED     
PSF_FOCUS_RECEIVED
PSF_FOCUS_LOST   
PSF_KEY_RECEIVED 
 
SCWindowWithMode further extends a SCWindow by adding modes.  Modes 
encapsulate the most important events for a given task, allowing you to change the 
behavior of events in you window at runtime.   
 
 
53