Microsoft KB Archive/159961

From BetaArchive Wiki

PRB: Palettes Not Realized Properly by a Direct3D Application

Q159961



The information in this article applies to:


  • Microsoft DirectX Software Development Kit, versions 2.0, 3.0, used with:
    • Microsoft Windows 95
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Professional





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.



REFERENCES

For more information about DirectX and Direct3D, see the DirectX topic in the Platform SDK. This is available on MSDN and online at

http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/directx/dxstart_1x2d.htm

Additional query words: 2.00 3.00 KbDSI

Keywords : KbDirectX300 kbSDKWin32 kbDirectX200
Issue type : kbprb
Technology : kbSDKDirectXsearch kbAudDeveloper


Last Reviewed: June 26, 2001
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.