Re: List View problem


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Brian Levantine on January 15, 2005 at 10:11:50:

In Reply to: Re: List View problem posted by Grant Foraker on January 14, 2005 at 07:15:12:

Hi Grant COS.GetSystemMetrics can be used to determine the current width/height of the screen/desktop. Once you've determined the screen size, you can use a different set of dimensions for you window.

Look in CosWin.Ibs and Windows.Inc to find the syntax/values to use for this function. I've include the definitions below. Remember to substitue a '.' for the '_' for use with IB programs.


GetSystemMetrics
The GetSystemMetrics function retrieves various system metrics (widths and heights of display elements) and system configuration settings. All dimensions retrieved by GetSystemMetrics are in pixels.

cosIndex = ! system metric or configuration setting
Gosub COS.GetSystemMetrics
Result = cosFuncResult

Parameters
cosIndex
[in] Specifies the system metric or configuration setting to retrieve. All SM_CX* values are widths. All SM_CY* values are heights. The following values are defined. Value Meaning
SM_ARRANGE Flags specifying how the system arranged minimized windows. For more information about minimized windows, see the following Remarks section.

SM_CLEANBOOT Value that specifies how the system was started:
0 Normal boot
1 Fail-safe boot
2 Fail-safe with network boot

Fail-safe boot (also called SafeBoot, Safe Mode, or Clean Boot) bypasses the user's startup files.

SM_CMONITORS Windows 98/Me, Windows 2000/XP: Number of display monitors on the desktop. See Remarks for more information.
SM_CMOUSEBUTTONS Number of buttons on mouse, or zero if no mouse is installed.

SM_CXBORDER,SM_CYBORDER Width and height, in pixels, of a window border. This is equivalent to the SM_CXEDGE value for windows with the 3-D look.

SM_CXCURSOR,SM_CYCURSOR Width and height, in pixels, of a cursor. The system cannot create cursors of other sizes.

SM_CXDLGFRAME,SM_CYDLGFRAME Same as SM_CXFIXEDFRAME and SM_CYFIXEDFRAME.

SM_CXDOUBLECLK,SM_CYDOUBLECLK Width and height, in pixels, of the rectangle around the location of a first click in a double-click sequence. The second click must occur within this rectangle for the system to consider the two clicks a double-click. (The two clicks must also occur within a specified time.)

To set the width and height of the double-click rectangle, call SystemParametersInfo with the SPI_SETDOUBLECLKHEIGHT and SPI_SETDOUBLECLKWIDTH flags.

SM_CXDRAG,SM_CYDRAG Width and height, in pixels, of a rectangle centered on a drag point to allow for limited movement of the mouse pointer before a drag operation begins. This allows the user to click and release the mouse button easily without unintentionally starting a drag operation.

SM_CXEDGE,SM_CYEDGE Dimensions, in pixels, of a 3-D border. These are the 3-D counterparts of SM_CXBORDER and SM_CYBORDER.

SM_CXFIXEDFRAME,SM_CYFIXEDFRAME Thickness, in pixels, of the frame around the perimeter of a window that has a caption but is not sizable. SM_CXFIXEDFRAME is the height of the horizontal border and SM_CYFIXEDFRAME is the width of the vertical border.
Same as SM_CXDLGFRAME and SM_CYDLGFRAME.

SM_CXFOCUSBORDER,SM_CYFOCUSBORDER Windows XP: The width of the left and right edges and the height of the top and bottom edges of the focus rectangle drawn by DrawFocusRect. These values are in pixels.

SM_CXFRAME,SM_CYFRAME Same as SM_CXSIZEFRAME and SM_CYSIZEFRAME.

SM_CXFULLSCREEN,SM_CYFULLSCREEN Width and height of the client area for a full-screen window on the primary display monitor. To get the coordinates of the portion of the screen not obscured by the system taskbar or by application desktop toolbars, call the SystemParametersInfo function with the SPI_GETWORKAREA value.

SM_CXHSCROLL,SM_CYHSCROLL Width, in pixels, of the arrow bitmap on a horizontal scroll bar; and height, in pixels, of a horizontal scroll bar.

SM_CXHTHUMB Width, in pixels, of the thumb box in a horizontal scroll bar.

SM_CXICON,SM_CYICON The default width and height, in pixels, of an icon. The LoadIcon function can load only icons of these dimensions.

SM_CXICONSPACING,SM_CYICONSPACING Dimensions, in pixels, of a grid cell for items in large icon view. Each item fits into a rectangle of this size when arranged. These values are always greater than or equal to SM_CXICON and SM_CYICON.

SM_CXMAXIMIZED,SM_CYMAXIMIZED Default dimensions, in pixels, of a maximized top-level window on the primary display monitor.

SM_CXMAXTRACK,SM_CYMAXTRACK Default maximum dimensions, in pixels, of a window that has a caption and sizing borders. This metric refers to the entire desktop. The user cannot drag the window frame to a size larger than these dimensions. A window can override these values by processing the WM_GETMINMAXINFO message.

SM_CXMENUCHECK,SM_CYMENUCHECK Dimensions, in pixels, of the default menu check-mark bitmap.

SM_CXMENUSIZE,SM_CYMENUSIZE Dimensions, in pixels, of menu bar buttons, such as the child window close button used in the multiple document interface.

SM_CXMIN,SM_CYMIN Mini


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):






[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]