Click here to Skip to main content
12,507,674 members (49,465 online)
Click here to Skip to main content
Articles » Multimedia » GDI » Regions » Downloads

Stats

181.7K views
5.8K downloads
123 bookmarked
Posted

Guide to WIN32 Regions

, 10 Mar 2002 CPOL
Guide to understanding how to create and use regions with the WIN32 SDK
RgnGuide.exe
arrow.cur
RgnGuide.dsp
res
RgnGuide.ico
cursor1.cur
Toolbar.bmp
// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#if !defined(AFX_STDAFX_H__4911E547_55EE_4521_ABF9_B3844ED79A13__INCLUDED_)
#define AFX_STDAFX_H__4911E547_55EE_4521_ABF9_B3844ED79A13__INCLUDED_

// Change these values to use different versions
#define WINVER		0x0400
#define _WIN32_IE	0x0400
#define _RICHEDIT_VER	0x0100


#include <atlbase.h>
#include <atlapp.h>

extern CAppModule _Module;

#include <atlwin.h>

/******************************************************************************
Author:		Paul Watt
Date:		3/5/2002
Purpose:	A Simple structure to hold all of the region data for the document
			of this application.
******************************************************************************/
typedef struct tagRegionDoc
{
	HRGN hSrc1;
	HRGN hSrc2;

	tagRegionDoc ()
	{
		hSrc1 = ::CreateRectRgn(0,0,0,0);
		hSrc2 = ::CreateRectRgn(0,0,0,0);
	}

	~tagRegionDoc ()
	{
		::DeleteObject(hSrc1);
		::DeleteObject(hSrc2);
	}

} RegionDoc;

extern RegionDoc g_rgnDoc;


#endif // !defined(AFX_STDAFX_H__4911E547_55EE_4521_ABF9_B3844ED79A13__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Paul M Watt
Engineer
United States United States
I am a software architect and I have been developing software for nearly two decades. Over the years I have learned to value maintainable solutions first. This has allowed me to adapt my projects to meet the challenges that inevitably appear during development. I use the most beneficial short-term achievements to drive the software I develop towards a long-term vision.

C++ is my strongest language. However, I have also used x86 ASM, ARM ASM, C, C#, JAVA, Python, and JavaScript to solve programming problems. I have worked in a variety of industries throughout my career, which include:
• Manufacturing
• Consumer Products
• Virtualization
• Computer Infrastructure Management
• DoD Contracting

My experience spans these hardware types and operating systems:
• Desktop
o Windows (Full-stack: GUI, Application, Service, Kernel Driver)
o Linux (Application, Daemon)
• Mobile Devices
o Windows CE / Windows Phone
o Linux
• Embedded Devices
o VxWorks (RTOS)
o Greenhills Linux
o Embedded Windows XP

I am a Mentor and frequent contributor to CodeProject.com with tutorial articles that teach others about the inner workings of the Windows APIs.

I am the creator of an open source project on GitHub called Alchemy[^], which is an open-source compile-time data serialization library.

I maintain my own repository and blog at CodeOfTheDamned.com/[^], because code maintenance does not have to be a living hell.

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160927.1 | Last Updated 11 Mar 2002
Article Copyright 2002 by Paul M Watt
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid