请各位大牛告诉下Getentries(...)与Setentries(...)的作用吧!小弟真的不懂,

解决方案 »

  1.   


    The GetEntries method queries palette values from a DirectDrawPalette.SyntaxHRESULT GetEntries(
      DWORD dwFlags,
      DWORD dwBase,
      DWORD dwNumEntries,
      LPPALETTEENTRY lpEntries
      );ParametersdwFlagsNot used at this time. Must be zero.dwBaseThis is the start of the entries that should be retrieved sequentially.dwNumEntriesNumber of palette entries in the buffer pointed to by lpEntries.lpEntriesA pointer to the palette entries. The palette entries are one byte each if the DDPCAPS_8BITENTRIES flag is set in DDCAPS.dwPalCaps, and four bytes otherwise. Each field is a color description.Return ValuesValue Description 
    DD_OK The method succeeded. 
    DDERR_INVALIDOBJECT DirectDraw received a pointer that was an invalid DirectDraw object. 
    DDERR_INVALIDPARAMS One or more of the parameters passed to the function are incorrect. 
    DDERR_NOTPALETTIZED The surface being used is not a palette-based surface. The SetEntries method changes entries in a palette. The changes are made immediately. The palette must be attached to a surface using the SetPalette method before SetEntries can be used.SyntaxHRESULT SetEntries(
      DWORD dwFlags,
      DWORD dwStartingEntry,
      DWORD dwCount,
      LPPALETTEENTRY lpEntries
      );ParametersdwFlagsReserved. Must be zero.dwStartingEntryThe first entry to be set.dwCountThe number of palette entries to be changed.lpEntriesThe palette entries are one byte each if the DDPCAPS_8BITENTRIES flag is set in DDCAPS.dwPalCaps and four bytes otherwise. Each field is a color description.Return ValuesValue Description 
    DD_OK The method succeeded. 
    DDERR_UNSUPPORTED Action not supported. 
    DDERR_INVALIDOBJECT DirectDraw received a pointer that was an invalid DirectDraw object. 
    DDERR_INVALIDPARAMS One or more of the parameters passed to the function are incorrect. 
    DDERR_NOTPALETTIZED The surface being used is not a palette-based surface. 
    DDERR_NOPALETTEATTACHED No palette object attached to this surface.