What does the screen size mean?
maGetScrSize: what does the retured value mean?
Getting the Screen Size and Orientation
There are a lot of different screen sizes around now. It used to be that there were two or three common sizes which virtually all phones shared. Now, with so many different aspect ratios it is almost impossible to predict what the screen size and shape will be.
However, it is easy to query a device's screen size from within your application using the maGetScrSize() function:
MAExtent screenSize = maGetScrSize();
int scrWidth = EXTENT_X(screenSize);
int scrHeight = EXTENT_Y(screenSize);
This will give you the height and width of the screen in pixels. To know whether the screen is in landscape or portrait mode, you need to test the sizes:
if(scrWidth > scrHeight)
{
//Landscape mode
}
else
{
//Portrait mode
}
If you want a widget to be a quarter of the screen size, then you can specify it as:
Widget* alertLabel = new Label(0, 0, scrWidth / 2, scrHeight / 2, NULL);
OK,thank you!