LabWindows/CVI

ColorPicker_Convert

int ColorPicker_Convert (int panel, int canvas, int transparentItemBitmap, int sliderBitmap, int cursorBitmap);

Purpose

Converts an existing canvas control to a color picker control.

Pass the existing canvas control ID to ColorPicker_Convert. This ID becomes the ID for the color picker control.

Parameters

Input
Name Type Description
panel int The specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
canvas int The defined constant, located in the .uir header file, that you assigned to the canvas control in the User Interface Editor, or the ID of the canvas control returned by NewCtrl or DuplicateCtrl.

This ID becomes the ID for the color picker control, and you can use it to specify the control in subsequent function calls.
transparentItemBitmap int ID of the bitmap object that contains the image to use for the transparent item. Obtain the ID from NewBitmapEx, GetBitmapFromFile, GetCtrlBitmap, ClipboardGetBitmap, GetCtrlDisplayBitmap, GetPanelDisplayBitmap, GetScaledPanelDisplayBitmap, GetScaledCtrlDisplayBitmap, or DuplicateBitmap.

Pass 0 to use the default bitmap.
sliderBitmap int ID of the bitmap object that contains the image to use for the shade area slider. Obtain the ID from NewBitmapEx, GetBitmapFromFile, GetCtrlBitmap, ClipboardGetBitmap, GetCtrlDisplayBitmap, GetPanelDisplayBitmap, GetScaledPanelDisplayBitmap, GetScaledCtrlDisplayBitmap, or DuplicateBitmap.

Pass 0 to use the default bitmap.
cursorBitmap int ID of the bitmap object that contains the image to use for the gradient area cursor. Obtain the ID from NewBitmapEx, GetBitmapFromFile, GetCtrlBitmap, ClipboardGetBitmap, GetCtrlDisplayBitmap, GetPanelDisplayBitmap, GetScaledPanelDisplayBitmap, GetScaledCtrlDisplayBitmap, or DuplicateBitmap.

Pass 0 to use the default bitmap.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Additional Information

Library: Color Picker Control

Include file: custctrl\color_picker.h

LabWindows/CVI compatibility: LabWindows/CVI 9.0 and later

Examples

Refer to the following examples that use the ColorPicker_Convert function:

  • apps\iconedit\iconedit.cws

    Open example
  • userint\custctrl\colorpicker\colorpickerdemo.cws

    Open example