ParamBlockDesc2 Flags
 
 
 

The topic describes significant new ParamBlockDesc2 flags.

P_READ_SECOND_FLAG_VALUE

If this flag is set on the first per param constructor-specifiable flag value, a second DWORD-size per-parameter constructor-specifiable flag value follows the first. The value is read-in, shifted left DWORD places and combined with the first flag value to form the ParamDef flag value. This input flag bit is not set in the ParamDef flag value after the flag values are read-in, and this bit can be re-used as a per-parameter internal flag bit.

The following code is an example of how to use this new flag:

static  ParamBlockDesc2 bend_param_blk ( bend_params, _T("Bend Parameters"), 0, &bendDesc, P_AUTO_CONSTRUCT + P_AUTO_UI, SIMPMOD_PBLOCKREF,
//rollout
IDD_BENDPARAM, IDS_RB_PARAMETERS, 0, 0, NULL,
// params
 
bend_angle, _T("BendAngle"), TYPE_FLOAT, P_RESET_DEFAULT|P_ANIMATABLE|P_READ_SECOND_FLAG_VALUE,   P_USE_ACCESSOR_ONLY, IDS_ANGLE,
  p_default, 0.0f,
  p_range, -BIGFLOAT, BIGFLOAT,
  p_ui, TYPE_SPINNER, EDITTYPE_FLOAT, IDC_ANGLE, IDC_ANGLESPINNER, 0.5f,
  end,
 
bend_dir, _T("BendDir"), TYPE_FLOAT, P_RESET_DEFAULT|P_ANIMATABLE, IDS_DIR,
  p_default, 0.0f,
  p_range, -BIGFLOAT, BIGFLOAT,
  p_ui, TYPE_SPINNER, EDITTYPE_FLOAT, IDC_DIR, IDC_DIRSPINNER, 0.5f,
  end,

The 2nd flag value is read on BendAngle because P_READ_SECOND_FLAG_VALUE is set in the first flag value.

P_USE_ACCESSOR_ONLY

When this flag is set, the paramblock2 will only go through an objects's accessor when getting or setting a value, or when determining if a key exists at a certain time.

If P_USE_ACCESSOR_ONLY is not set:

P_USE_ACCESSOR_ONLY is specified in the second per-parameter constructor-specifiable flag value.