PRB: Palettes Not Realized Properly by a Direct3D Application

Last reviewed: September 5, 1997
Article ID: Q159961
2.00 3.00 WINDOWS kbprg kbprb

The information in this article applies to:

  • Microsoft DirectX 3 Software Development Kit, version 3.0 on the following platform: Win95
  • Microsoft DirectX 2 Software Development Kit for Windows 95, version 2.0 on the following platform: Win95

SYMPTOMS

Direct3D applications that create Direct3DRMDevices from DirectDraw Clipper objects with the CreateDeviceFromClipper() function may not properly realize the Direct3D palette in use. This behavior occurs when the window associated with the Clipper object is not the active window.

CAUSE

Direct3D relies on the WM_ACTIVATE message processing to do palette realization.

RESOLUTION

For the Direct3D application to correctly realize the palette used by Direct3D, the window to which the DirectDraw Clipper object is associated should be the currently-active window at the time the Direct3DRMDevice is created. This is accomplished by calling the SetFocus() function and passing in the applications Main Window handle to bring the application to the foreground.

Another workaround is to avoid creating the Direct3DRMDevice from a Direct Draw Clipper object. Instead, the application could create a Direct3DRMDevice from a Direct Draw Surface. However, this would require the application to manage the surface and the palettes used by that Direct Draw Surface.

STATUS

This behavior is by design.


KBCategory: kbprg kbprb
KBSubcategory: GdiDirect3D GdiPal
Additional reference words: 2.00 3.00 KbDSI
.END:
Keywords : GdiDirect3D GdiPal kbprb kbprg
Technology : kbDirectXSDK
Version : 2.00 3.00
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.