Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.24
LEADTOOLS Raster imaging C++ Class library help

LAnimationWindow::DoModalColorResItems

Show in webframe

#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 users 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
LTDLG
LTEFX
LTFIL
LTIMG
LTSCR
LTTWN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Win32, x64.

See Also

Functions:

LAnimationWindow::LAnimationWindow, LAnimationWindow::ColorResItems, LAnimationWindow::Load, LAnimationWindow::PlayAnimation, Class Members

Example

#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName
L_INT LAnimationWindow_DoModalColorResItemsExample(HWND hWndParent)
{
   L_INT nRet;
   LBase::LoadLibraries(LT_ALL_LEADLIB); 
 //make sure all libraries are loaded
   LAnimationWindow MyAnimation;
   MyAnimation.SetFileName(MAKE_IMAGE_PATH(TEXT("eye.gif")));
   nRet = MyAnimation.Load();
   if (nRet==SUCCESS)
   {
      /* Get a palette for the animation*/
      nRet = MyAnimation.DoModalColorResItems(hWndParent);
      if (nRet==SUCCESS_DLG_CANCEL)
      {
         MessageBox(hWndParent, TEXT("User aborted the dialog!"),TEXT("Example"), MB_OK | MB_ICONINFORMATION);
         return FAILURE ;
      }
      MyAnimation.CreateWnd(hWndParent,0, WS_VISIBLE|WS_CHILD|WS_BORDER,0,0,300,300);
      nRet = MyAnimation.PlayAnimation();
      if(nRet != SUCCESS)
         return nRet;
      while (MyAnimation.IsPlaying())
      {
         if (MyAnimation.DoEvents())
            break; 
 
      }
   } 
   else
      return nRet;
   return SUCCESS;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.