SilverScreen Solid Modeler

SilverScreen Input Processing

SilverScreen Input Processing

Previous topic Next topic  

SilverScreen Input Processing

Previous topic Next topic JavaScript is required for the print function  

SilverPlusEllipse

 

SilverScreen Input Processing

 

 

Introduction

 

Most MFC applications use the default MFC message processing mechanisms to allow messages to be routed to appropriate handler classes. However SilverScreen has a number of situations where it is necessary to use a modal-style inchar function to control input. This inchar is the same as is used in the SilverC library.The following diagrams illustrate the relationship between a standard MFC application (Figure 1), SilverScreen in standalone usage (Figure 2), and SilverScreen with a subclassing DLL (Figure 3). Note that the subclassing typically pertains to that of SilverScreen’s main frame and view windows.

 

 

 

MFC Event Flow

The following figure shows the default flow of events through a normal MFC application. The MFC application MessagePump routing causes application events to be dispatched to the MFC window procedure, and from there they are routed out to the appropriate MFC class objects.

Figure 1

Figure 1

 

 

 

SilverScreen Event Flow

The following figure shows how the situation exists in SilverScreen when running in standalone mode. Because SilverScreen needs to implement modal-style inchar routing, both for its internal use, and for use in SilverC programs, the normal flow of messages is changed by subclassing the main frame and the view windows, passing the messages through the SilverScreen window procedure. When inchar is called, the SilverScreen window procedure picks out messages that are appropriate for returning via inchar, and sends them off that way. Other messages are passed through to MFC as normal. When inchar is not called, then message flow proceeds as before. Note that in this situation, when inchar is called, some messages are passed to MFC as well as returned via inchar, while others are not passed down to MFC.

Figure 2

Figure 2

 

 

SilverScreen Event Flow with DLL Subclassing

The following figure shows the situation when the DLL developer subclasses the main frame and view windows. The DLL window procedure is inserted in the subclass chain before the SilverScreen window procedure. Any messages that pass through the DLL window procedure may be filtered off by not calling the next handler in the chain; or modified by changing the parameters passed to the next message handler, or ignored altogether.

Figure 3

Figure 3