YOU CAN CODE!

 

With The Case Of UCanCode.net  Release The Power OF  Visual C++ !   HomeProducts | PurchaseSupport | Downloads  
Download Evaluation
Pricing & Purchase?
E-XD++Visual C++/ MFC Products
Overview
Features Tour 
Electronic Form Solution
Visualization & HMI Solution
Power system HMI Solution
CAD Drawing and Printing Solution

Bar code labeling Solution
Workflow Solution

Coal industry HMI Solution
Instrumentation Gauge Solution

Report Printing Solution
Graphical modeling Solution
GIS mapping solution

Visio graphics solution
Industrial control SCADA &HMI Solution
BPM business process Solution

Industrial monitoring Solution
Flowchart and diagramming Solution
Organization Diagram Solution

Graphic editor Source Code
UML drawing editor Source Code
Map Diagramming Solution

Architectural Graphic Drawing Solution
Request Evaluation
Purchase
ActiveX COM Products
Overview
Download
Purchase
Technical Support
  General Q & A
Discussion Board
Contact Us

Links

Get Ready to Unleash the Power of UCanCode .NET


UCanCode Software focuses on general application software development. We provide complete solution for developers. No matter you want to develop a simple database workflow application, or an large flow/diagram based system, our product will provide a complete solution for you. Our product had been used by hundreds of top companies around the world!

"100% source code provided! Free you from not daring to use components because of unable to master the key technology of components!"


VC++ MFC Tutorial: GDI,CRgn,CreateRectRgn,CreateEllipticRgn,CreatePolygonRgn,CombineRgn,RectInRegion,Free Source Code Download

 
 

Regions

Support for GDI regions is provided in MFC through the CRgn class. A region is created by first creating the CRgn object, and then calling an initialization function.

There are a large number of CRgn initialization functions. These are summarized in Table 2.

    Table 2. CRgn initialization functions.

Member Function


Creates


CreateRectRgn

A rectangular region

CreateRectRgnIndirect

A region from a RECT structure

CreateEllipticRgn

An elliptical region

CreateEllipticRgnIndirect

An elliptical region from a RECT structure

CreatePolygonRgn

A polygonal region

CreatePolyPolygonRgn

A region of several (possibly disjoint) polygons

CreateRoundRectRgn

A region in the shape of a rounded rectangle

CombineRgn

A region that is the union of two existing regions

CopyRgn

A region that is the copy of another region

CreateFromPath

A region from a path

CreateFromData

A region from a RGNDATA structure and an XFORM matrix

To compare two CRgn objects and check if they are equivalent, use the EqualRgn member function. To obtain a RGNDATA structure for a CRgn object, call GetRegionData. To obtain a region's bounding rectangle (that is, the tightest rectangle that encloses the region), call GetRgnBox.

To set a region to a specific rectangle, call SetRectRgn. To move a region by a specific offset, use OffsetRgn.

You can determine whether a given point or parts of a given rectangle fall within the region; use the PtInRegion or RectInRegion member functions.

A CRgn object can be used in place of an HRGN handle in GDI function calls, thanks to the presence of the operator function operator HRGN.

MFC Example

Note:

UCanCode Advance E-XD++ CAD Drawing and Printing Solution Source Code Solution for C/C++, .NET V2024 is released!


Contact UCanCode Software

To buy the source code or learn more about with:

 

 

 

Copyright ?1998-2024 UCanCode.Net Software , all rights reserved.
Other product and company names herein may be the trademarks of their respective owners.

Please direct your questions or comments to webmaster@ucancode.net