13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ResizePaletteResizePalette 3.0SyntaxBaaL ResizePalette(hPalette, nNumEntries)function ResizePalette(Palette: HPalette; NumEntries: Word): Bool;This function changes the size of the logical palette specified by thehPalette parameter to the number of entries specified by the nNumEntriesparameter. If an application calls ResizePalette to reduce the size of thepalette, the entries remaining in the resized palette are unchanged.If the application calls ResizePalette to enlarge the palette, the additionalpalette entries are set to black (the red, green, and blue values are all 0)and the flags for all additional entries are set to o.Parameters hPalette HPALETTE Identifies the palette to be changed.Return valuenNumEntries int Specifies the number of entries in the palette after it hasbeen resized.The return value specifies the outcome of the function. It is TRUE if thepalette was successfully resized. Otherwise, it is FALSE.RestoreDCSyntaxBOOLRestoreDC(hDC, nSavedDC)function RestoreDC(DC: HDC; SavedDC: Integer): Bool;This function restores the device context specified by the hDC parameterto the previous state identified by the nSavedDC parameter.The RestoreDC function restores the device context by copying stateinformation saved on the context stack by earlier calls to the Save DCfunction.The context stack can contain the state information for several devicecontexts. If the context specified by nSavedDC is not at the top of the stack,RestoreDC deletes any state information between the device contextspecified by the nSavedDC parameter and the top of the stack. The deletedinformation is lost.Chapter 4, Functions directory 473

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!