Setting the Window Style

The style of a window refers to both its visible attributes (such as the border width) and its invisible ones (such as whether to redraw the window when it is resized). The Style command from the Design menu controls the prototyped window's style.

Choosing the Style command causes the Style dialog box to appear, which lists all the style attributes available (Figure 5.2). The default settings are the ones used by most Windows applications, but different settings may work better for your application.

·To change the style of the prototyped window:

1.From the Design menu, choose Style.

2.Select the style attributes you want.

3.Choose OK.

The style attributes include the following:

Redraw when Sized

Redraws the entire window whenever it is resized, even if parts of the window remain the same.

Exclude Children when Painting

Ensures that when the parent window (the one you're prototyping) is redrawn, it will not overwrite any child windows.

System Menu

Includes a System menu on the left side of the title bar. The System menu is activated by pressing ALT+SPACEBAR and contains the following commands (all provided by Windows): Restore, Move, Size, Minimize, Maximize, Close, Switch To, and Run.

Initially Visible

Makes your application's window visible when the application starts. (Some applications do “background processing” and do not require a visible window.)

Title Bar

Includes a title bar at the top of the window. Removing the title bar also removes any Minimize or Maximize buttons, the System menu, and the menu bar.

Minimize Button

Includes a minimize button on the right side of the title bar. Clicking the button shrinks the window to an inactive icon at the bottom of the screen.

Maximize Button

Includes a maximize button on the right side of the title bar. Clicking the button expands the window to fill the entire screen.

Menu Bar

Adds a bar below the title bar for menu items.

Byte Alignment

Forces the window's border to appear on an alignment boundary (an invisible grid on the screen). Turning off byte alignment allows your window to be positioned at an exact screen location but slows down the program's execution speed.

Sizable Frame

Uses a standard border style for application windows or, if unchecked, a single-line border style usually used for dialog boxes.

An application's border style usually depends on what the application does. Interactive applications—ones in which the user works directly with the application—almost always use a standard border. Purely informational applications (such as a clock), however, might use the thin border style.