Windows 95 Window Management

Windows 95 implements some window management features in 16 bits. The use of 16 bits imposes some restrictions on parameters in functions and messages and places limits on internal storage. In some cases, Windows 95 provides features that can be used to avoid these restrictions and limitations. For example, the standard edit control is limited to somewhat less than 64 kilobytes (K) of text; however, the text in a rich edit control is limited only by available memory.

Handles

Windows 95 permits up to 16,364 window handles and 16,364 menu handles. Although Windows NT supports more handles than this, Windows 95 does support significantly more handles than Windows version 3.1.

Messages

The wParam parameter for the SendMessageCallback, SendMessageTimeout, and SendNotifyMessage functions is limited to a 16-bit value.

In Windows 95, the wParam parameter in list box messages, such as LB_INSERTSTRING or LB_SETITEMDATA, is limited to a 16-bit value. One effect of this limit is that list boxes cannot contain more than 32,767 items. Although the number of items is restricted, the total size, in bytes, of the items in a list box is limited only by available memory. In contrast, a 64K data limit is imposed by Windows version 3.1.

Any private application message must be defined above WM_USER + 0x100. A value above this will ensure that there is no collision between private messages and dialog box control messages.

Three-Dimensional Look

Windows 95 automatically applies the standard three-dimensional shading and color scheme to dialog boxes created by applications marked as version 4.0 or later. Applications that are marked for earlier versions can still get the three-dimensional appearance by applying the DS_3DLOOK style to dialog boxes. If this style is used, the system automatically applies the three-dimensional look without requiring the application to check the operating system version. This is useful, for example, in applications developed for Windows NT version 3.5. The DS_3DLOOK style is ignored in Windows NT version 3.1.

Message-box Styles

In Windows 95, the MB_ICONQUESTION style used with the MessageBox, MessageBoxEx, and MessageBoxIndirect functions is obsolete. Win32-based applications should use the MB_ICONEXCLAMATION style instead. Similarly, applications should use the MB_ICONINFORMATION style instead of the MB_ICONASTERISK style and the MB_ICONSTOP style instead of the MB_ICONHAND style.

Cursors

The IDC_SIZE and IDC_ICON values used with the LoadCursor function are obsolete and should not be used in a Windows 95 – based application or in a Win32-based application that is marked as version 4.0.

Desktop

In Windows 95, only one desktop is available while the system runs. Although the thread desktop functions, GetThreadDesktop and SetThreadDesktop, are available under Windows 95, they do not do anything.