Microsoft KB Archive/59498

SBMP_CHILDSYSMENU Constant Value Changed in OS/2 1.20 PSS ID Number: Q59498 Article last modified on 03-15-1990 PSS database name: O_Os2PrTk

1.20

OS/2

Question:

When we compile our code under Presentation Manager (PM) Version 1.20 and run the code on a machine with PM Version 1.10, the “MDI type” of sysmenu for the child windows [that is, the ChildSysMenu bitmap] is not there. Why is this happening?

Response:

This problem is caused by a change to the available system bitmaps in Version 1.20. Specifically, system bitmaps are kept in an array, with the SBMP_* constants being indexes into the array. This problem occurs because the indexes were changed in the OS/2 Version 1.20 Programmer’s Toolkit.

In the OS/2 Version 1.20 Programmer’s Toolkit, SBMP_CHILDSYSMENU is #defined as 29. In the OS/2 Version 1.10 Programmer’s Toolkit, SBMP_CHILDSYSMENU is defined as 14.

The reason for the new value is the change in the appearance of the child sysmenu, and the titlebar menu items in general. To maintain backward compatibility, the Version 1.10 bitmaps remained while the Version 1.20 bitmaps were “added on.” Unfortunately, the side effect, as you have noted, is caused by the new indexes. Index 29 literally does not exist in Version 1.10; therefore, the bitmap does not appear.

The solution to this problem is to determine which version of the system you are running under, and use the proper constant to get at the appropriate bitmap for either Version 1.10 or Version 1.20.

Copyright Microsoft Corporation 1990.