|
|
1.1 ! root 1: /*==============================================================*\ ! 2: * Pnt.c - routines for the painting of the main window ! 3: * Created 1989, 1990 Microsoft Corp. ! 4: *-------------------------------------------------------------- ! 5: * ! 6: * This module contains the code for the main client window ! 7: * painting ! 8: * ! 9: *-------------------------------------------------------------- ! 10: * ! 11: * This source file contains the following functions: ! 12: * ! 13: * MainPaint(hwnd) - main WM_PAINT processing routine ! 14: * ! 15: \*==============================================================*/ ! 16: ! 17: /*--------------------------------------------------------------*\ ! 18: * Include files, macros, defined constants, and externs ! 19: \*--------------------------------------------------------------*/ ! 20: ! 21: #define INCL_WINSYS ! 22: ! 23: #include <os2.h> ! 24: #include "main.h" ! 25: #include "xtrn.h" ! 26: ! 27: /*--------------------------------------------------------------*\ ! 28: * Global variables ! 29: \*--------------------------------------------------------------*/ ! 30: ! 31: /*--------------------------------------------------------------*\ ! 32: * Entry point declarations ! 33: \*--------------------------------------------------------------*/ ! 34: ! 35: ! 36: ! 37: /****************************************************************\ ! 38: * Main client painting routine ! 39: *-------------------------------------------------------------- ! 40: * ! 41: * Name: MainPaint(hwnd) ! 42: * ! 43: * Purpose: Paints the main client window. ! 44: * ! 45: * Usage: Routine is called whenver the client window ! 46: * procedure receives a WM_PAINT message ! 47: * ! 48: * Method: ! 49: * - begins painting by calling WinBeginPaint ! 50: * and retrieving the HPS for the window ! 51: * - performs any painting desired ! 52: * - ends painting by calling WinEndPaint ! 53: * ! 54: * Returns: ! 55: * ! 56: \****************************************************************/ ! 57: VOID MainPaint(hwnd) ! 58: HWND hwnd; /* handle of the window to be painted */ ! 59: { ! 60: RECTL rclUpdate; ! 61: HPS hps; ! 62: ! 63: hps = WinBeginPaint(hwnd, NULL, (PRECTL)&rclUpdate); ! 64: ! 65: /* fill update rectangle with window color */ ! 66: WinFillRect(hps, (PRECTL)&rclUpdate, SYSCLR_WINDOW); ! 67: ! 68: ! 69: /*--------------------------------------------------*\ ! 70: * Add painting routines here. Hps is now ! 71: * the HPS for the window and rclUpdate ! 72: * contains the update rectangle. ! 73: \*--------------------------------------------------*/ ! 74: ! 75: WinEndPaint(hps); ! 76: ! 77: } /* MainPaint() */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.