File:  [OS/2 SDKs] / os232sdk / toolkt20 / c / samples / style / sty_pnt.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 12:26:30 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: os2sdk-1990, HEAD
Microsoft OS/2 SDK 2.0 05-30-1990

/*==============================================================*\
 *  Pnt.c - routines for the painting of the main window
 *      Created 1990, Microsoft, IBM  Corp.
 *--------------------------------------------------------------
 *
 *  This module contains the code for the main client window
 *  painting
 *
 *--------------------------------------------------------------
 *
 *  This source file contains the following functions:
 *
 *      MainPaint(hwnd) - main WM_PAINT processing routine
 *
\*==============================================================*/

/*--------------------------------------------------------------*\
 *  Include files, macros, defined constants, and externs
\*--------------------------------------------------------------*/

#define  INCL_WINSYS

#include <os2.h>
#include "sty_main.h"
#include "sty_xtrn.h"

/*--------------------------------------------------------------*\
 *  Global variables
\*--------------------------------------------------------------*/

/*--------------------------------------------------------------*\
 *  Entry point declarations
\*--------------------------------------------------------------*/



/****************************************************************\
 *  Main client painting routine
 *--------------------------------------------------------------
 *
 *  Name:   MainPaint(hwnd)
 *
 *  Purpose: Paints the main client window.
 *
 *  Usage:  Routine is called whenver the client window
 *          procedure receives a WM_PAINT message
 *
 *  Method:
 *          - begins painting by calling WinBeginPaint
 *              and retriving the HPS for the window
 *          - performs any painting desired
 *          - ends painting by calling WinEndPaint
 *
 *  Returns:
 *
\****************************************************************/
VOID MainPaint(hwnd)
HWND hwnd;      /* handle of the window to be painted */
{
    RECTL rclUpdate;
    HPS hps;

    hps = WinBeginPaint(hwnd, NULL, (PRECTL)&rclUpdate);

    /* fill update rectangle with window color */
    WinFillRect(hps, (PRECTL)&rclUpdate, SYSCLR_WINDOW);


    /*--------------------------------------------------*\
     *      Add painting routines here.  Hps is now
     *      the HPS for the window and rclUpdate
     *      contains the update rectangle.
    \*--------------------------------------------------*/

    WinEndPaint(hps);

}   /* MainPaint() */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.