Chapter 23:
User Interface Dialog Functions
 

InitAmigoDialog(); Initialize the user-interface dialogs

 

Prompt3DViewAnglePresetDialog(); Prompt 3D View Angle Preset Dialog

 

PromptChartOptionsDialog(); Prompt Chart Options Dialog

 

PromptChartTypesDialog(); Prompt Chart Types Dialog

 

PromptDataAnalyzerDialog(); Prompt Data Analyzer Dialog

 

PromptDropShadowDialog(); Prompt Drop Shadow Dialog

 

PromptFillGradientsDialog(); Prompt Fill Gradients Dialog

 

PromptFillPatternDialog(); Prompt Fill Pattern Dialog

 

PromptFillPicturesDialog(); Prompt Fill Pictures Dialog

 

PromptFillTexturesDialog(); Prompt Fill Textures Dialog

 

PromptFormattingDialog(); Prompt Formatting Dialog

 

PromptGridScaleDialog(); Prompt Grids & Scales Dialog

 

PromptLightingPresetDialog(); Prompt Lighting Preset Dialog

 

PromptLineGradientsDialog(); Prompt Line Gradients Dialog

 

PromptLinePatternDialog(); Prompt Line Pattern Dialog

 

PromptLinePicturesDialog(); Prompt Line Pictures Dialog

 

PromptLineTexturesDialog(); Prompt Line Textures Dialog

 

PromptModelPresetDialog(); Prompt Line Model Preset Dialog

 

PromptSeriesOptionsDialog(); Prompt Line Series Options Dialog

 

PromptTextGradientsDialog(); Prompt Text Gradients Dialog

 

PromptTextPatternDialog(); Prompt Text Pattern Dialog

 

PromptTextPicturesDialog(); Prompt Text Pictures Dialog

 

PromptTextTexturesDialog(); Prompt Text Textures Dialog

 

PromptTitleDialog(); Prompt Titles Dialog

 

SetHelpFilePath(); Set Help File Path for User-Interface Dialogs

InitAmigoDialog()

 

This function initializes the DLL. IT MUST BE CALLED BEFORE ANY OTHER FUNCTION.

Syntax:

PUBLIC BOOL InitAmigoDialog(
     HINSTANCE hResInstDLL,
     HKEY keyRoot,
     LPCTSTR szRegKeyPath,
     LPCTSTR szSupportFilesPath
);

Input:

hResInstDLL: Handle to the resource DLL (in case the caller loaded it already). In most cases, use NULL.

 

keyRoot: Root registry key where you want data to be stored in the registry (i.e. HKEY_LOCAL_MACHINE ).

 

szRegKeyPath: Registry path where you want data to be stored in the registry (i.e. "Software\\Three D Graphics, Inc.\\My Path\\").

 

szSupportFilesPath: Path pointing to the directory where the support files are located (i.e. "c:\wkbase32\output\support files" ).

Return:

BOOL: TRUE if successful, FALSE if not. It would fail if one or more parameters were invalid.

Also See:

Prompt3DViewAnglePresetDialog(), PromptChartOptionsDialog(), PromptChartTypesDialog(), PromptDataAnalyzerDialog(), PromptDropShadowDialog(), PromptFillGradientsDialog(), PromptFillPatternDialog(), PromptFillPicturesDialog(), PromptFillTexturesDialog(), PromptFormattingDialog(), PromptGridScaleDialog(), PromptLightingPresetDialog(), PromptLineGradientsDialog(), PromptLinePatternDialog(), PromptLinePicturesDialog(), PromptModelPresetDialog(), PromptSeriesOptionsDialog(), PromptTextGradientsDialog(), PromptTextPatternDialog(), PromptTextPicturesDialog(), PromptTextTexturesDialog(), PromptTitleDialog(), SetHelpFilePath()

Prompt3DViewAnglePresetDialog()

 

This function shows the 3D Viewing Angles dialog and allows the user to apply a viewing angle to the 3D cube.

Syntax:

#ifdef __cplusplus

 

PUBLIC int Prompt3DViewAnglePresetDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     BOOL* bApplied,
     LPCSTR lpszDialogTitle = NULL
);

 

#else

 

PUBLIC int Prompt3DViewAnglePresetDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     BOOL* bApplied,
     LPCSTR lpszDialogTitle
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

 

lpszDialogTitle; Pointer to a title string to be drawn in the title area of the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Example:

// Amigo 3D View Angle dialog
Prompt3DViewAnglePresetDialog(hWnd,hWnd,&gpGraph,
     &bApplied,"Misc 3D Angle Opts");
//Force a redraw so any changes take effect
InvalidateRect (hWnd, &rOld, TRUE);

 

Also See:

InitAmigoDialog(), SetHelpFilePath()

   

PromptChartOptionsDialog()

 

This function shows the Chart Options dialog and allows the user to select and apply chart-formatting options.

Syntax:

#ifdef __cplusplus

 

PUBLIC int PromptChartOptionsDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void* pDE,
     void** pSelList,
     int nDefaultTab,
     BOOL* bApplied,
     LPCSTR lpszDialogTitle = NULL
);

 

#else

 

PUBLIC int PromptChartOptionsDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void* pDE,
     void** pSelList,
     int nDefaultTab,
     BOOL* bApplied,
     LPCSTR lpszDialogTitle
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pDE: Pointer to the Drawing Environment

 

pSelList: Address of the graph element selection list pointer

 

nDefaultTab: One of the following values selects the default section of the Chart Options dialog to display on start-up:

 

#define

Value

Description

 

TAB_DEFAULT

-1

Default

 

TAB_CO_AREA_GENERAL

1

Chart Options General Tab for a 2D area chart

 

TAB_CO_BAR_GENERAL

2

Chart Options General Tab for a 2D bar chart

 

TAB_CO_BAR_LAYOUT

3

Chart Options Layout Tab for a 2D bar chart

 

TAB_CO_BUBBLE_GENERAL

4

Chart Options General Tab for a 2D bubble chart

 

TAB_CO_BUBBLE_LAYOUT

5

Chart Options Layout Tab for a 2D bubble chart

 

TAB_CO_DISPLAYSTATUS

6

Chart Options Display Status Tab

 

TAB_CO_DUALY

7

Chart Options Dual-Y Options Tab

 

TAB_CO_LABEL

8

Chart Options Labels Tab

 

TAB_CO_LOOK

9

Chart Options Look Tab

 

TAB_CO_PIE_DISPLAYSTATUS

10

Chart Options Display Status Tab for a Pie chart

 

TAB_CO_PIE_GENERAL

11

Chart Options General Tab for a Pie chart

 

TAB_CO_PIE_LABEL

12

Chart Options Label Tab for a Pie chart

 

TAB_CO_PIE_LAYOUT

13

Chart Options Layout Tab for a Pie chart

 

TAB_CO_PIE_SPLIT

14

 
 

TAB_CO_SCATTER_GENERAL

15

Chart Options General Tab for a 2D Scatter chart

 

TAB_CO_SCATTER_LAYOUT

16

Chart Options Layout Tab for a 2D Scatter chart

 

TAB_CO_SURFACE_GENERAL

17

Chart Options General Tab for a 3D Surface chart

 

TAB_CO_SURFACE_LAYOUT

18

Chart Options Layout Tab for a 3D Surface chart

 

TAB_CO_LINE_GENERAL

19

Chart Options General Tab for a 2D Line Chart

 

TAB_CO_HISTOGRAM_LAYOUT

20

Chart Options Layout Tab for a Histogram

 

TAB_CO_NUMBER_FORMAT

21

Chart Options Number Format Tab

 

TAB_CO_LEGEND

32

Chart Options Legend Tab

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

 

lpszDialogTitle; Pointer to a title string to be drawn in the title area of the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Example:

BOOL bApplied;
PromptChartOptionsDialog(this->m_hWnd,
     this->m_hWnd,
     &m_gpGraph,
     m_gpDrawEnv,(void**)&m_gpList,
     TAB_DEFAULT,&bApplied,NULL);
InvalidateRect(m_Rect);

 

Also See:

InitAmigoDialog(), SetHelpFilePath()

   

PromptChartTypesDialog()

 

This function shows the Choose a Chart... dialog and lets the user select a different chart type.

Syntax:

#ifdef __cplusplus

 

PUBLIC int PromptChartTypesDialog(
     HWND hDlgParent,
     HWND hTarget,
     void** pGraph,
     BOOL bNewGraph,
     BOOL* bApplied ,
     LPCSTR lpszDialogTitle = NULL
);

 

#else

 

PUBLIC int PromptChartTypesDialog(
     HWND hDlgParent,
     HWND hTarget,
     void** pGraph,
     BOOL bNewGraph,
     BOOL* bApplied,
     LPCSTR lpszDialogTitle
);

Input:

hDlgParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

bNewGraph; Address of a boolean flag indicating whether the a new graph was selected in the dialog.

 

TRUE=

New graph was selected

 

FALSE=

New graph was not selected

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

 

lpszDialogTitle; Pointer to a title string to be drawn in the title area of the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Example:

BOOL bApplied;
PromptChartTypesDialog(this->m_hWnd,
     this->m_hWnd,&m_gpGraph,FALSE,&bApplied);
InvalidateRect(m_Rect);

 

Also See:

InitAmigoDialog(), SetHelpFilePath()

   

PromptDataAnalyzerDialog()

 

This function shows the Data Analyzer dialog. The charting engine will suggest different charts types that are appropriate for the data that defines the chart.

Syntax:

#ifdef __cplusplus

 

PUBLIC int PromptDataAnalyzerDialog(
     HWND hDlgParent,
     HWND hTarget,
     void** pGraph,
     BOOL bNewGraph,
     BOOL* bApplied,
     LPCSTR lpszDialogTitle = NULL
);

 

#else

 

PUBLIC int PromptDataAnalyzerDialog(
     HWND hDlgParent,
     HWND hTarget,
     void** pGraph,
     BOOL bNewGraph,
     BOOL* bApplied,
     LPCSTR lpszDialogTitle
);

Input:

hDlgParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

bNewGraph; Address of a boolean flag indicating whether the a new graph was selected in the dialog.

 

TRUE=

New graph was selected

 

FALSE=

New graph was not selected

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

 

lpszDialogTitle; Pointer to a title string to be drawn in the title area of the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Example:

Also See:

InitAmigoDialog(), SetHelpFilePath()

   

PromptDropShadowDialog()

 

This function shows the drop shadow dialog and allows the user to apply a drop shadow to a text object.

Syntax:

PUBLIC int PromptDropShadowDialog(
     HWND hParent,
     HWND hTarget,
     DropShadowInstPtr pDrop,
     BOOL* bApplied
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pDrop: Pointer to the drop shadow instance data structure. Set the DropShadowInstRec in Appendix A.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Example:

Also See:

InitAmigoDialog(), SetHelpFilePath()

PromptFillGradientsDialog()

 

This function shows the gradient selection dialog and allows the user to apply a gradient to an area object.

Syntax:

PUBLIC int PromptFillGradientsDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void** pSelList,
     void* pFX,
     BOOL* bApplied
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pSelList: Address of the graph element selection list pointer.

 

pFX: Pointer to the special effects (gradients) data structure. See the FXStruct in Appendix A.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Example:

FXStruct aSFX;
PromptFillGradientsDialog(hWnd,hWnd,&gpGraph,
     &gpList,&aSFX, &bApplied);
//Force a redraw so any changes take effect
InvalidateRect (hWnd, &rOld, TRUE);

 

Also See:

InitAmigoDialog(), SetHelpFilePath()

   

PromptFillPatternDialog()

 

This function shows the pattern selection dialog and allows the user to apply a pattern to an area object.

Syntax:

PUBLIC int PromptFillPatternDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void** pSelList,
     BOOL* bApplied
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pSelList: Address of the graph element selection list pointer.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Example:

PromptFillPatternDialog(hWnd,hWnd,&gpGraph,
     &gpList,&aSFX, &bApplied);

 

Also See:

InitAmigoDialog(), SetHelpFilePath()

PromptFillPicturesDialog()

 

This function shows the picture (clip art) selection dialog and allows the user to apply a picture to an area object.

Syntax:

PUBLIC int PromptFillPicturesDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void** pSelList,
     BOOL* bApplied
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pSelList: Address of the graph element selection list pointer.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Example:

PromptFillPictures(hWnd,hWnd,&gpGraph,
     &gpList,&aSFX, &bApplied);

 

Also See:

InitAmigoDialog(), SetHelpFilePath()

PromptFillTexturesDialog()

 

This function shows the texture selection dialog and allows the user to apply a texture to an area object.

Syntax:

PUBLIC int PromptFillTexturesDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void** pSelList,
     BOOL* bApplied
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pSelList: Address of the graph element selection list pointer.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Example:

PromptFillTexturesDialog(hWnd,hWnd,&gpGraph,
     &gpList,&aSFX, &bApplied);

 

Also See:

InitAmigoDialog(), SetHelpFilePath()

PromptFormattingDialog()

 

This function shows the formatting dialog and allows the user to format area, line and text objects.

Syntax:

PUBLIC int PromptFormattingDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void** pSelList,
     void* pDE,
     BOOL* bApplied
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pSelList: Address of the graph element selection list pointer.

 

pDE: Point to a drawing environment.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Example:

BOOL bApplied;
PromptFormattingDialog(this->m_hWnd,
     this->m_hWnd,
     &m_gpGraph,
     (void**)&m_gpList,
     m_gpDrawEnv,
     &bApplied);
InvalidateRect(m_Rect);

 

Also See:

InitAmigoDialog(), SetHelpFilePath()

   

PromptGridScaleDialog()

 

This function shows the Grids & Scales dialog and allows the user to format chart axes.

Syntax:

#ifdef __cplusplus

 

PUBLIC int PromptGridScaleDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void* pDE,
     void** pSelList,
     int nDefaultAxis,
     int nDefaultTab,
     BOOL* bApplied,
     LPCSTR lpszDialogTitle = NULL
);

 

#else

 

PUBLIC int PromptGridScaleDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void* pDE,
     void** pSelList,
     int nDefaultAxis,
     int nDefaultTab,
     BOOL* bApplied,
     LPCSTR lpszDialogTitle
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pDE: Pointer to a drawing environment.

 

pSelList: Address of the graph element selection list pointer.

 

nDefaultAxis: One of the following values selects the axis tab in the Grids & Scales dialog to display:

 

#define

Value

Description

 

AXIS_Y1

0

Y1 Axis

 

AXIS_Y2

1

Y2 Axis

 

AXIS_X

2

X Axis

 

AXIS_O1

3

O1 Axis

 

AXIS_O2

4

O2 Axis

 

AXIS_Z

5

Z Axis

 

nDefaultTab: Selects the section of the Grids & Scales dialog to display at start-up:

 

#define

Value

Description

 

TAB_GENERAL

1

Grids & Scales General Tab

 

TAB_SCALES

2

Grids & Scales Scales Tab

 

TAB_LABELS

3

Grids & Scales Labels Tab

 

TAB_GRIDS

4

Grids & Scales Grids Tab

 

TAB_NUMBERS

5

Grids & Scales Numbers Tab

 

TAB_QUADRANT

6

Grids & Scales Quadrant Tab for bubble and scatter charts only

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

 

lpszDialogTitle; Pointer to a title string to be drawn in the title area of the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Example:

Also See:

InitAmigoDialog(), SetHelpFilePath()

   

PromptLightingPresetDialog()

 

When advanced charts are being used, this function shows the lighting selection dialog and allows the user to apply a special lighting to the chart.

Syntax:

#ifdef __cplusplus

 

PUBLIC int PromptLightingPresetDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     BOOL* bApplied,
     LPCSTR lpszDialogTitle = NULL
);

 

#else

 

PUBLIC int PromptLightingPresetDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     BOOL* bApplied,
     LPCSTR lpszDialogTitle
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

 

lpszDialogTitle; Pointer to a title string to be drawn in the title area of the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Example:

BOOL bApplied;
PromptLightingPresetDialog(this->m_hWnd,
     this->m_hWnd,&m_gpGraph, &bApplied,NULL);
InvalidateRect(m_Rect);

 

Also See:

InitAmigoDialog(), SetHelpFilePath()

   

PromptLineGradientsDialog()

 

This function shows the gradient selection dialog and allows the user to apply a gradient to a line object.

Syntax:

PUBLIC int PromptLineGradientsDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void** pSelList,
     void* pFX,
     BOOL* bApplied);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pSelList: Address of the graph element selection list pointer.

 

pFX: Pointer to the special effects (gradients) data structure. See the FXStruct in Appendix A.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Also See:

InitAmigoDialog(), SetHelpFilePath()

PromptLinePatternDialog()

 

This function shows the pattern selection dialog and allows the user to apply a pattern to a line object.

Syntax:

PUBLIC int PromptLinePatternDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void** pSelList,
     BOOL* bApplied
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pSelList: Address of the graph element selection list pointer.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Also See:

InitAmigoDialog(), SetHelpFilePath()

PromptLinePicturesDialog()

 

This function shows the picture (clip art) selection dialog and allows the user to apply a picture to a line object.

Syntax:

PUBLIC int PromptLinePicturesDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void** pSelList,
     BOOL* bApplied
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pSelList: Address of the graph element selection list pointer.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Also See:

InitAmigoDialog(), SetHelpFilePath()

PromptLineTexturesDialog()

 

This function shows the texture selection dialog and allows the user to apply a texture to a line object.

Syntax:

PUBLIC int PromptLineTexturesDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void** pSelList,
     BOOL* bApplied
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pSelList: Address of the graph element selection list pointer.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Also See:

InitAmigoDialog(), SetHelpFilePath()

PromptModelPresetDialog()

 

This function shows the 3D-model selection dialog and allows the user to apply a model to riser objects.

Syntax:

PUBLIC int PromptModelPresetDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void** pSelList,
     BOOL* bApplied
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pSelList: Address of the graph element selection list pointer.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Example:

Also See:

InitAmigoDialog(), SetHelpFilePath()

PromptSeriesOptionsDialog()

 

This function shows the series options dialog and allows the user to format and apply options to a particular series in a chart.

Syntax:

#ifdef __cplusplus

 

PUBLIC int PromptSeriesOptionsDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void* pDE,
     void** pSelList,
     int nDefaultTab,
     BOOL* bApplied,
     LPCSTR lpszDialogTitle = NULL
);

 

#else

 

PUBLIC int PromptSeriesOptionsDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void* pDE,
     void** pSelList,
     int nDefaultTab,
     BOOL* bApplied,
     LPCSTR lpszDialogTitle
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pDE: Pointer to a drawing environment.

 

pSelList: Address of the graph element selection list pointer.

 

nDefaultTab: One of the following values selects the section of the Series Options dialog to display at start-up:

 

TAB_DEFAULT

-1

Default

 

TAB_SO_PIE_GENERAL

22

Series Options General Tab for a Pie chart

 

TAB_SO_LINE_GENERAL

23

Series Options General Tab for a 2D Line chart

 

TAB_SO_BAR_GENERAL

24

Series Options General Tab for a 2D Bar chart

 

TAB_SO_TRENDLINE

25

Series Options Trend line Tab

 

TAB_SO_LABEL

26

Series Options Labels Tab

 

TAB_SO_PIE_LABEL

27

Series Options Labels Tab for a Pie chart

 

TAB_SO_NUMBER_FORMAT

28

Series Options Number Format Tab

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

 

lpszDialogTitle; Pointer to a title string to be drawn in the title area of the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Example:

// Amigo Series Options dialog
PromptSeriesOptionsDialog(hWnd,hWnd,&gpGraph,
     gpDrawEnv,&gpList,TAB_DEFAULT,&bApplied,
     "Misc Series Opts");
//Force a redraw so any changes take effect
InvalidateRect (hWnd, &rOld, TRUE);

 

Also See:

InitAmigoDialog(), SetHelpFilePath()

   

PromptTextGradientsDialog()

 

This function shows the gradient selection dialog and allows the user to apply a gradient to a text object.

Syntax:

PUBLIC int PromptTextGradientsDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void** pSelList,
     void* pFX,
     BOOL* bApplied);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pSelList: Address of the graph element selection list pointer.

 

pFX: Pointer to the special effects (gradients) data structure. See the FXStruct in Appendix A.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Also See:

InitAmigoDialog(), SetHelpFilePath()

PromptTextPatternDialog()

 

This function shows the pattern selection dialog and allows the user to apply a pattern to a text object.

Syntax:

PUBLIC int PromptTextPatternDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void** pSelList,
     BOOL* bApplied
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pSelList: Address of the graph element selection list pointer.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Also See:

InitAmigoDialog(), SetHelpFilePath()

PromptTextPicturesDialog()

 

This function shows the picture (clip art) selection dialog and allows the user to apply a picture to a text object.

Syntax:

PUBLIC int PromptTextPicturesDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void** pSelList,
     BOOL* bApplied
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pSelList: Address of the graph element selection list pointer.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Also See:

InitAmigoDialog(), SetHelpFilePath()

PromptTextTexturesDialog()

 

This function shows the texture selection dialog and allows the user to apply a texture to a text object.

Syntax:

PUBLIC int PromptTextTexturesDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void** pSelList,
     BOOL* bApplied
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pSelList: Address of the graph element selection list pointer.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Also See:

InitAmigoDialog(), SetHelpFilePath()

PromptTitleDialog()

 

This function shows the titles dialog and allows the user to define and show/hide chart titles.

Syntax:

#ifdef __cplusplus

 

PUBLIC int PromptTitleDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void* pDE,
     BOOL* bApplied ,
     LPCSTR lpszDialogTitle = NULL
);

 

#else

 

PUBLIC int PromptTitleDialog(
     HWND hParent,
     HWND hTarget,
     void** pGraph,
     void* pDE,
     BOOL* bApplied ,
     LPCSTR lpszDialogTitle
);

Input:

hParent; Windows handle to the parent window containing this Prompt dialog.

 

hTarget; Windows handle to the window containing the chart to be updated by this Prompt dialog. May be NULL, if the target window is the same as the parent window.

 

pGraph; Address of the graph pointer.

 

pDE: Pointer to a drawing environment.

 

bApplied; Address of a boolean flag indicating whether the APPLY button was selected in the dialog.

 

TRUE=

APPLY button was selected in the dialog

 

FALSE=

APPLY button was not selected in the dialog

 

lpszDialogTitle; Pointer to a title string to be drawn in the title area of the dialog

Return:

int; return value from Windows dialog (e.g., IDABORT, IDOK, IDCANCEL, etc.)

Example:

BOOL bApplied;
PromptTitleDialog(this->m_hWnd,
     this->m_hWnd,
     &m_gpGraph,
     m_gpDrawEnv,
     &bApplied,NULL);
InvalidateRect(m_Rect);

 

Also See:

InitAmigoDialog(), SetHelpFilePath()

   

SetHelpFilePath

 

This function is used in conjunction with the user-interface dialog functions to set the help file path. It defines the location where the charting engine will look for a help file to be displayed when the user selects the help button in a user interface dialog. If this function is not called, a default help file path is used (same name and path as the DLL).

Syntax:

PUBLIC void
SetHelpFilePath(
     char * szPath
);

Input:

szPath: Full path to the helpfile

Return:

void

Also See:

InitAmigoDialog(), Prompt3DViewAnglePresetDialog(), PromptChartOptionsDialog(), PromptChartTypesDialog(), PromptDataAnalyzerDialog(), PromptDropShadowDialog(), PromptFillGradientsDialog(), PromptFillPatternDialog(), PromptFillPicturesDialog(), PromptFillTexturesDialog(), PromptFormattingDialog(), PromptGridScaleDialog(), PromptLightingPresetDialog(), PromptLineGradientsDialog(), PromptLinePatternDialog(), PromptLinePicturesDialog(), PromptLineTexturesDialog(), PromptModelPresetDialog(), PromptSeriesOptionsDialog(), PromptTextGradientsDialog(), PromptTextPatternDialog(), PromptTextPicturesDialog(), PromptTextTexturesDialog(), PromptTitleDialog()