3ds Max C++ API Reference
hsv.h File Reference
#include "maxheap.h"
#include "coreexp.h"
#include <WTypes.h>
#include "geom/acolor.h"
#include "geom/ipoint2.h"
#include "baseinterface.h"
#include "strbasic.h"

Classes

class  HSVCallback
 
class  ColorPicker
 
class  ColPick
 

Macros

#define MAXCOLORS   16
 
#define WM_ADD_COLOR   (WM_USER+2321)
 
#define DEFAULT_COLPICK_CLASS_ID   1
 

Functions

CoreExport INT_PTR HSVDlg_Do (HWND hwndOwner, DWORD *lpc, IPoint2 *spos, HSVCallback *callBack, const MCHAR *name)
 
CoreExport INT_PTR HSVDlg_Do (HWND hwndOwner, AColor *lpc, IPoint2 *spos, HSVCallback *callBack, const MCHAR *name)
 
CoreExport void RGBtoHSV (DWORD rgb, int *ho, int *so, int *vo)
 
CoreExport DWORD HSVtoRGB (int H, int S, int V)
 
CoreExport void HSVtoHWBt (int h, int s, int v, int *ho, int *w, int *bt)
 
CoreExport void HWBttoHSV (int h, int w, int bt, int *ho, int *s, int *v)
 
CoreExport Color RGBtoHSV (Color rgb)
 
CoreExport Color HSVtoRGB (Color hsv)
 
CoreExport ColorPickerCreateColorPicker (HWND hwndOwner, DWORD initColor, IPoint2 *spos, HSVCallback *pcallback, const MCHAR *name, int objClr=0)
 
CoreExport ColorPickerCreateColorPicker (HWND hwndOwner, AColor initColor, IPoint2 *spos, HSVCallback *pcallback, const MCHAR *name, int objClr=0)
 
CoreExport void SetCPInitPos (IPoint2 &pos)
 
CoreExport IPoint2 GetCPInitPos (void)
 
CoreExport ColPickSetCurColPick (ColPick *colpick)
 
CoreExport ColPickGetCurColPick ()
 

Macro Definition Documentation

◆ MAXCOLORS

#define MAXCOLORS   16

◆ WM_ADD_COLOR

#define WM_ADD_COLOR   (WM_USER+2321)

◆ DEFAULT_COLPICK_CLASS_ID

#define DEFAULT_COLPICK_CLASS_ID   1

Function Documentation

◆ HSVDlg_Do() [1/2]

CoreExport INT_PTR HSVDlg_Do ( HWND  hwndOwner,
DWORD *  lpc,
IPoint2 spos,
HSVCallback callBack,
const MCHAR name 
)
Remarks
This method puts up the modal HSV color picker dialog box. This dialog appears below:

Parameters:
HWND hwndOwner

Owner window handle.

DWORD *lpc

Pointer to color to be edited. See COLORREF.

IPoint2 *spos

The starting position of the upper left corner of the dialog window. This is set to the ending position when the user is done. You may pass NULL to get the default location.

HSVCallback *callBack

Callback object whose procs are called when the color changes. See Class HSVCallback.

MCHAR *name

The name of color being edited to appear in the title bar.
Returns
Returns TRUE if the user exists the dialog with OK, otherwise returns FALSE.

◆ HSVDlg_Do() [2/2]

CoreExport INT_PTR HSVDlg_Do ( HWND  hwndOwner,
AColor lpc,
IPoint2 spos,
HSVCallback callBack,
const MCHAR name 
)
Remarks
This method puts up the modal HSV color picker dialog box.
Parameters:
HWND hwndOwner

Owner window handle.

AColor *lpc

Pointer to color to be edited.

IPoint2 *spos

The starting position of the upper left corner of the dialog window. This is set to the ending position when the user is done. You may pass NULL to get the default location.

HSVCallback *callBack

Callback object whose procs are called when the color changes. See Class HSVCallback.

MCHAR *name

The name of color being edited to appear in the title bar.
Returns
Returns TRUE if the user exists the dialog with OK, otherwise returns FALSE.

◆ CreateColorPicker() [1/2]

CoreExport ColorPicker* CreateColorPicker ( HWND  hwndOwner,
DWORD  initColor,
IPoint2 spos,
HSVCallback pcallback,
const MCHAR name,
int  objClr = 0 
)
Remarks
Call this function to bring up the modeless color picker.
Parameters:
HWND hwndOwner

The owner window handle.

DWORD initColor

The initial color for the color picker.

IPoint2* spos

The initial screen position of the upper left corner. NULL may be passed for the default location.

HSVCallback *pcallback

The callback object to respond to color change events.

MCHAR *name

The title string in the dialog.

int objClr=0

A BOOLEAN used to indicate that the ColorPicker is being used to set the object color from the control panel. In all other cases, the default value of 0 should be used.
Returns
A pointer to a ColorPicker object.

◆ CreateColorPicker() [2/2]

CoreExport ColorPicker* CreateColorPicker ( HWND  hwndOwner,
AColor  initColor,
IPoint2 spos,
HSVCallback pcallback,
const MCHAR name,
int  objClr = 0 
)

◆ SetCPInitPos()

CoreExport void SetCPInitPos ( IPoint2 pos)
Remarks
Establishes the color picker initial screen position.
Parameters:
IPoint2 &pos

The upper left corner screen coordinate for the color picker.

◆ GetCPInitPos()

CoreExport IPoint2 GetCPInitPos ( void  )
Remarks
Retrieves the color picker initial screen position.
Returns
The screen coordinates of the color picker. This is the coordinate of the upper left corner.

◆ SetCurColPick()

CoreExport ColPick* SetCurColPick ( ColPick colpick)
Remarks
This function is available in release 3.0 and later only.

This global function is used internally to establish the current color picker used.
Parameters:
ColPick *colpick

Points to the color picker to use.
Returns
A pointer to the current color picker.

◆ GetCurColPick()

CoreExport ColPick* GetCurColPick ( )
Remarks
This function is available in release 3.0 and later only.

Returns a pointer to the current color picker.