Visible to Intel only — GUID: GUID-C0314E65-038C-4503-9D30-B62071E79AFA
Visible to Intel only — GUID: GUID-C0314E65-038C-4503-9D30-B62071E79AFA
Using Callback Routines
All callback routines run in a separate thread from the main program. As a result, all multithread issues apply. In particular, sharing data, drawing to windows, and doing I/O must be properly coordinated and controlled.
QuickWin callback routines, both for menu callbacks and mouse callbacks, should do a minimum of processing and then return. While processing a callback, the program will appear to be non-responsive because messages are not being serviced. This is why it is important to return quickly.
If more processing time is needed in a callback, another thread should be started to perform this work; threads can be created by calling the Windows API CreateThread. If a callback routine does not start a new thread, the callback will not be reentered until it is done processing.