|
|
Microsoft OS/2 SDK 2.0 05-30-1990
/*==============================================================*\
* Pnt.c - routines for the painting of the main window
* Created 1989, 1990 Microsoft 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 "main.h"
#include "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 retrieving 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() */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.