Blocks32: Demonstrates CRectTracker Class (141888)



The information in this article applies to:

  • The Microsoft Foundation Classes (MFC), when used with:
    • Microsoft Visual C++, 32-bit Editions 4.0

This article was previously published under Q141888

SUMMARY

BLOCKS32 is a sample that demonstrates CRectTracker class. The user of the BLOCKS32 sample can create rectangle, ellipse, and rounded rectangle graphical objects. Once the objects are created, the mouse can be used to manipulate the objects by changing their size or position on the screen. The user can save to a disk file the state of objects in the document for use in another session.

The following files are available for download from the Microsoft Download Center:


Blocks32.exe

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

MORE INFORMATION

BLOCKS32 demonstrates the following:

  • Deriving a class from the CObject class
  • Using virtual functions with user-defined classes
  • Maintaining a list of classes
  • Creating static data and static member functions in a class
  • Using the serialization feature of the CObject class to save classes to and read classes from a disk file
  • Using CRectTracker class
BLOCKS32 uses the following MFC classes: CArchive, CBrush, CClientDC, CDC, CFile, CFrameWnd, CPaintDC, CPen, CPoint, CRect, CWinApp, and CRectTracker.

Modification Type:MinorLast Reviewed:8/5/2004
Keywords:kbdownload kbcode kbfile kbSample KbUIDesign KB141888 kbAudDeveloper