LAnimationWindow::DoModalColorResItems
#include "ltwrappr.h"
L_INT LAnimationWindow::DoModalColorResItems(hwndParent=NULL)
| HWND hwndParent; | /* handle to the parent window */ | 
Brings up the Color Resolution dialog box and creates an optimized palette for all bitmaps in the list, depending on the user’s options.
| Parameter | Description | 
| hwndParent | Handle to the parent window of the dialog. | 
Returns
| SUCCESS | The function was successful. | 
| < 1 | An error occurred. Refer to Return Codes. | 
Comments
For more information, refer to LDialogColor::DoModalColorRes.
Required DLLs and Libraries
| LTDIS For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. | 
See Also
| Functions: | LAnimationWindow::LAnimationWindow, LAnimationWindow::ColorResItems, LAnimationWindow::Load, LAnimationWindow::PlayAnimation, Class Members | 
Example
#include " ltlck.h" //Unlock support
L_VOID TestFunction(HWND hWndParent)
{
   LBase::LoadLibraries(LT_ALL_LEADLIB); 
 //make sure all libraries are loaded
   LAnimationWindow MyAnimation;
   WRPUNLOCKSUPPORT();
   MyAnimation.SetFileName(TEXT("eye.gif"));
   if (MyAnimation.Load()==SUCCESS)
   {
      /* Get a palette for the animation*/
      L_INT nRetCode = MyAnimation.DoModalColorResItems(hWndParent);
      if (nRetCode==SUCCESS_DLG_CANCEL)
      {
         MessageBox(hWndParent, 
 TEXT("User aborted the dialog!"),TEXT("Example"), 
 MB_OK | MB_ICONINFORMATION);
         return;
      }
      MyAnimation.CreateWnd(hWndParent,0, 
 WS_VISIBLE|WS_CHILD|WS_BORDER,0,0,300,300);
      MyAnimation.PlayAnimation();
      while (MyAnimation.IsPlaying())
      {
         if (MyAnimation.DoEvents())
            break; 
 
      }
   } 
}