CHOOSE_COLOUR_EX@

Platform

Win32, x64

Purpose

To display a standard Windows dialog box so that the user can select a colour.

Syntax

SUBROUTINE CHOOSE_COLOUR_EX@( COLOUR, CUSTOM, FLAGS )
INTEGER COLOUR, CUSTOM(16), FLAGS

Return value

This is a more flexible alternative to the simpler CHOOSE_COLOUR@.

COLOUR is both the initial value and the value returned by the dialog. A returned value of -1 means that the dialog has been canceled.

CUSTOM is both the initial set of values for the "Custom colors" in the dialog and the values for this set returned by the dialog.

FLAGS is an input value that is normally set to zero. When non-zero, the value is used in the resulting call to the Microsoft API function called ChooseColor.

The user can use the dialog to define custom colours that are available if the dialog is opened again before the program terminates (default values are restored when the program restarts).

Example

  INTEGER colour,custom(16)
  colour = RGB@(0,0,0)
  custom = RGB@(255,255,255)
  CALL CHOOSE_COLOUR_EX@(colour, custom, 0)
  IF(colour /= -1) THEN ...				
				

See also

CHOOSE_COLOUR@, CHOOSE_FONT@

 

 

Basket
Empty
 
Copyright © 1999-2020 Silverfrost Limited