SilverScreen Solid Modeler

SilverEngine Input Processing

SilverEngine Input Processing

Previous topic Next topic  

SilverEngine Input Processing

Previous topic Next topic JavaScript is required for the print function  

SilverEngineEllipse

 

SilverEngine Input Processing

 

 

Introduction

 

Most MFC applications use the default MFC message processing mechanisms to allow messages to be routed to appropriate handler classes. However SilverEngine 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), and SilverEngine as a subclassing DLL (Figure 2). Note that the subclassing typically pertains to that of the application's main frame window.

 

 

 

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

 

 

 

SilverEngine Event Flow

The following figure shows how the situation exists when you have provided SilverEngine a frame window via engine_set_frame_window. In order for SIlverEngine to implement modal-style inchar routing for interactive prompting, the normal flow of messages is changed by subclassing the main frame and  passing the messages through the SilverEngine window procedure. When inchar is called, the SilverEngine  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