Home

Accessories for Windows Controls: A Size

   

Introduction

To represent the size of an object, the Win32 library provides the SIZE structure defined as follows:

typedef struct tagSIZE { 
LONG cx; 
LONG cy; 
} SIZE, *PSIZE;

The cx member variable is usually used as the distance from the left to the right borders of a control. The cy member variable usually represents the distance from the top to the bottom borders of the control.

Besides the Win32’s SIZE, you can also use the VCL’s TSize structure defined as follows:

struct tagSIZE
{
	long cx;
	long cy;
} typedef tagSIZE TSize;

The member variables of the TSize structure represent the width as cx and the height as cy of an object.

 

     
 

Home Copyright © 2010-2016, FunctionX