#include "audiofolder.hh"
#include "audiofolderhelp.h"

extern HMODULE hSettingsResource;

/* extern */
MRESULT EXPENTRY settingsGeneralOptionDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
MRESULT EXPENTRY settingsGeneralOption2DlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
MRESULT EXPENTRY settingsCdrdaoOptionDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
MRESULT EXPENTRY settingsCdrdaoOptionDlgProc2(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
MRESULT EXPENTRY settingsCdrdaoOptionDlgProc3(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
MRESULT EXPENTRY settingsGrabberOptionDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
MRESULT EXPENTRY settingsMpg123OptionDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
MRESULT EXPENTRY settingsCdrecordOptionDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
MRESULT EXPENTRY settingsMkisofsOptionDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
MRESULT EXPENTRY settingsCDDBOptionDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
MRESULT EXPENTRY settingsCDDBOptionDlgProc2(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ;
MRESULT EXPENTRY settingsToolbarOptionDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
MRESULT EXPENTRY settingsHintOptionDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
//MRESULT EXPENTRY settingsIsoFSOptionDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
void getMessage(char* text,ULONG ulID, LONG lSizeText, HMODULE hResource,HWND hwnd);

/* local */

#if 0
/********************************************************/
/* New class function which inserts the general options */
/* page 2 into the settings notebook                      */
/********************************************************/
BOOL CWCreatorSettings::cwAddIsoFSOptionPage(HWND hwndNotebook)
{
  PAGEINFO pageinfo;
    char pageName[100];

  //Clear the pageinfo structure
  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
  //Fill the pageinfo structure
  pageinfo.cb = sizeof(PAGEINFO);
  pageinfo.hwndPage = NULLHANDLE;
  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
  pageinfo.usPageInsertFlags = BKA_FIRST;
  //We want page numbers
  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
  //The dialog procedure for this page
  pageinfo.pfnwp = settingsIsoFSOptionDlgProc;
  //The resource DLL
  pageinfo.resid = hSettingsResource;
  //pageinfo.resid = queryModuleHandle();
  //The ID of the dialog template
  pageinfo.dlgid = IDDLG_ISOFSOPTIONS;
  //We need a pointer to our WPS-object in the dialog procedure
  //to call class functions
  pageinfo.pCreateParams = this;
  //The ID of the help panel for this page
  //pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
  //Tell the WPS the help library name
  pageinfo.pszHelpLibraryName = AFHELPLIBRARY;
  //We have a major tab so we need a name
  /* pageName: "ISO filesystem" */
  getMessage(pageName, IDSTRSETTING_ISOFS, sizeof(pageName),  hSettingsResource, hwndNotebook);
  pageinfo.pszName = pageName;
  
  //Insert the page into the settings notebook
  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
}
#endif

/********************************************************/
/* New class function which inserts the general options */
/* page 2 into the settings notebook                      */
/********************************************************/
BOOL CWCreatorSettings::cwAddGeneralOptionPage2(HWND hwndNotebook)
{
  PAGEINFO pageinfo;
    char pageName[100];

  //Clear the pageinfo structure
  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
  //Fill the pageinfo structure
  pageinfo.cb = sizeof(PAGEINFO);
  pageinfo.hwndPage = NULLHANDLE;
  pageinfo.usPageStyleFlags = BKA_STATUSTEXTON;
  pageinfo.usPageInsertFlags = BKA_FIRST;
  //We want page numbers
  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
  //The dialog procedure for this page
  pageinfo.pfnwp = settingsGeneralOption2DlgProc;
  //The resource DLL
  pageinfo.resid = hSettingsResource;
  //pageinfo.resid = queryModuleHandle();
  //The ID of the dialog template
  pageinfo.dlgid = IDDLG_GENERAL2PAGE;
  //We need a pointer to our WPS-object in the dialog procedure
  //to call class functions
  pageinfo.pCreateParams = this;
  //The ID of the help panel for this page
  pageinfo.idDefaultHelpPanel = IDDLG_GENERAL2PAGE;
  //Tell the WPS the help library name
  pageinfo.pszHelpLibraryName = AFHELPLIBRARY;
  //We have a major tab so we need a name
  /* pageName: "General" */
  //getMessage(pageName, IDSTRSETTING_GENERAL, sizeof(pageName),  hSettingsResource, hwndNotebook);
  //pageinfo.pszName = pageName;
  
  //Insert the page into the settings notebook
  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
}

/********************************************************/
/* New class function which inserts the General options */
/* page into the settings notebook                      */
/********************************************************/
BOOL CWCreatorSettings::cwAddGeneralOptionPage(HWND hwndNotebook)
{
  PAGEINFO pageinfo;
    char pageName[100];

  //Clear the pageinfo structure
  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
  //Fill the pageinfo structure
  pageinfo.cb = sizeof(PAGEINFO);
  pageinfo.hwndPage = NULLHANDLE;
  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
  pageinfo.usPageInsertFlags = BKA_FIRST;
  //We want page numbers
  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
  //The dialog procedure for this page
  pageinfo.pfnwp = settingsGeneralOptionDlgProc;
  //The resource DLL
  pageinfo.resid = hSettingsResource;
  //pageinfo.resid = queryModuleHandle();
  //The ID of the dialog template
  pageinfo.dlgid = IDDLG_GENERAL;
  //We need a pointer to our WPS-object in the dialog procedure
  //to call class functions
  pageinfo.pCreateParams = this;
  //The ID of the help panel for this page
  pageinfo.idDefaultHelpPanel = IDDLG_GENERAL;
  //Tell the WPS the help library name
  pageinfo.pszHelpLibraryName = AFHELPLIBRARY;
  //We have a major tab so we need a name
  /* pageName: "General" */
  getMessage(pageName, IDSTRSETTING_GENERAL, sizeof(pageName),  hSettingsResource, hwndNotebook);
  pageinfo.pszName = pageName;
  
  //Insert the page into the settings notebook
  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
}

/********************************************************/
/* New class function which inserts the General options */
/* page into the settings notebook                      */
/********************************************************/
BOOL CWCreatorSettings::cwAddToolbarOptionPage(HWND hwndNotebook)
{
  PAGEINFO pageinfo;
    char pageName[100];

  //Clear the pageinfo structure
  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
  //Fill the pageinfo structure
  pageinfo.cb = sizeof(PAGEINFO);
  pageinfo.hwndPage = NULLHANDLE;
  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
  pageinfo.usPageInsertFlags = BKA_FIRST;
  //We want page numbers
  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
  //The dialog procedure for this page
  pageinfo.pfnwp = settingsToolbarOptionDlgProc;
  //The resource DLL
  pageinfo.resid = hSettingsResource;
  //pageinfo.resid = queryModuleHandle();
  //The ID of the dialog template
  pageinfo.dlgid = IDDLG_TOOLBARSETTINGS;
  //We need a pointer to our WPS-object in the dialog procedure
  //to call class functions
  pageinfo.pCreateParams = this;
  //The ID of the help panel for this page
  pageinfo.idDefaultHelpPanel = 2000;
  //Tell the WPS the help library name
  pageinfo.pszHelpLibraryName = AFHELPLIBRARY;
  //We have a major tab so we need a name
  /* pageName: "General" */
  getMessage(pageName, IDSTRSETTING_TOOLBAR, sizeof(pageName),  hSettingsResource, hwndNotebook);
  pageinfo.pszName = pageName;
  
  //Insert the page into the settings notebook
  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
}

/********************************************************/
/* New class function which inserts the hint options    */
/* page into the settings notebook                      */
/********************************************************/
BOOL CWCreatorSettings::cwAddHintOptionPage(HWND hwndNotebook)
{
  PAGEINFO pageinfo;
    char pageName[100];

  //Clear the pageinfo structure
  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
  //Fill the pageinfo structure
  pageinfo.cb = sizeof(PAGEINFO);
  pageinfo.hwndPage = NULLHANDLE;
  pageinfo.usPageStyleFlags = BKA_STATUSTEXTON;
  pageinfo.usPageInsertFlags = BKA_FIRST;
  //We want page numbers
  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
  //The dialog procedure for this page
  pageinfo.pfnwp = settingsHintOptionDlgProc;
  //The resource DLL
  pageinfo.resid = hSettingsResource;
  //pageinfo.resid = queryModuleHandle();
  //The ID of the dialog template
  pageinfo.dlgid = IDDLG_HINTOPTIONS;
  //We need a pointer to our WPS-object in the dialog procedure
  //to call class functions
  pageinfo.pCreateParams = this;
  //The ID of the help panel for this page
  pageinfo.idDefaultHelpPanel = 2010;
  //Tell the WPS the help library name
  pageinfo.pszHelpLibraryName = AFHELPLIBRARY;
  //We have a major tab so we need a name
  /* pageName: "ISO filesystem" */
  //getMessage(pageName, IDSTRSETTING_ISOFS, sizeof(pageName),  hSettingsResource, hwndNotebook);
  //pageinfo.pszName = pageName;
  
  //Insert the page into the settings notebook
  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
}

/********************************************************/
/* New class function which inserts the Cdrecord option */
/* page into the settings notebook                      */
/********************************************************/
BOOL CWCreatorSettings::cwAddCdrecordOptionPage(HWND hwndNotebook)
{
  PAGEINFO pageinfo;
    char pageName[100];

  //Clear the pageinfo structure
  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
  //Fill the pageinfo structure
  pageinfo.cb = sizeof(PAGEINFO);
  pageinfo.hwndPage = NULLHANDLE;
  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
  pageinfo.usPageInsertFlags = BKA_FIRST;
  //We want page numbers
  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
  //The dialog procedure for this page
  pageinfo.pfnwp = settingsCdrecordOptionDlgProc;
  //The resource DLL
  pageinfo.resid = hSettingsResource;
  //pageinfo.resid = queryModuleHandle();
  //The ID of the dialog template
  pageinfo.dlgid = IDDLG_CDRECORDSETUP;
  //We need a pointer to our WPS-object in the dialog procedure
  //to call class functions
  pageinfo.pCreateParams = this;
  //The ID of the help panel for this page
  pageinfo.idDefaultHelpPanel = IDDLG_CDRECORDSETUP;
  //Tell the WPS the help library name
  pageinfo.pszHelpLibraryName = AFHELPLIBRARY;
  //We have a major tab so we need a name
  /* pageName: "CDRecord/2" */
  getMessage(pageName, IDSTRSETTING_CDRSETTINGS, sizeof(pageName),  hSettingsResource, hwndNotebook);
  pageinfo.pszName = pageName;
  
  //Insert the page into the settings notebook
  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
}


/********************************************************/
/* New class function which inserts the cdrdao          */
/* page into the settings notebook                      */
/********************************************************/
BOOL CWCreatorSettings::cwAddCdrdaoOptionPage(HWND hwndNotebook)
{
  PAGEINFO pageinfo;
  char pageName[100];

  //Clear the pageinfo structure
  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
  //Fill the pageinfo structure
  pageinfo.cb = sizeof(PAGEINFO);
  pageinfo.hwndPage = NULLHANDLE;
  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
  pageinfo.usPageInsertFlags = BKA_FIRST;
  //We want page numbers
  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
  //The dialog procedure for this page
  pageinfo.pfnwp = settingsCdrdaoOptionDlgProc;
  //The resource DLL
  pageinfo.resid = hSettingsResource;
  //pageinfo.resid = queryModuleHandle();
  //The ID of the dialog template
  pageinfo.dlgid = IDDLG_CDRDAOSETUP;
  //We need a pointer to our WPS-object in the dialog procedure
  //to call class functions
  pageinfo.pCreateParams = this;
  //The ID of the help panel for this page
  pageinfo.idDefaultHelpPanel = IDDLG_CDRDAOSETUP;
  //Tell the WPS the help library name
  pageinfo.pszHelpLibraryName = AFHELPLIBRARY;
  //We have a major tab so we need a name
  /* pageName: "cdrdao/2" */
  getMessage(pageName, IDSTRSETTING_CDRDAOSETTINGS, sizeof(pageName),  hSettingsResource, hwndNotebook);
  pageinfo.pszName = pageName;
  
  //Insert the page into the settings notebook
  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
}

/********************************************************/
/* New class function which inserts the cdrdao          */
/* page into the settings notebook                      */
/********************************************************/
BOOL CWCreatorSettings::cwAddCdrdaoOptionPage2(HWND hwndNotebook)
{
  PAGEINFO pageinfo;
  char pageName[100];

  //Clear the pageinfo structure
  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
  //Fill the pageinfo structure
  pageinfo.cb = sizeof(PAGEINFO);
  pageinfo.hwndPage = NULLHANDLE;
  pageinfo.usPageStyleFlags =  BKA_STATUSTEXTON;
  pageinfo.usPageInsertFlags = BKA_FIRST;
  //We want page numbers
  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
  //The dialog procedure for this page
  pageinfo.pfnwp = settingsCdrdaoOptionDlgProc2;
  //The resource DLL
  pageinfo.resid = hSettingsResource;
  //pageinfo.resid = queryModuleHandle();
  //The ID of the dialog template
  pageinfo.dlgid = IDDLG_CDRDAOSETUP2;
  //We need a pointer to our WPS-object in the dialog procedure
  //to call class functions
  pageinfo.pCreateParams = this;
  //The ID of the help panel for this page
  pageinfo.idDefaultHelpPanel = IDDLG_CDRDAOSETUP; /* No separate help panel yet!!! */
  //Tell the WPS the help library name
  pageinfo.pszHelpLibraryName = AFHELPLIBRARY;
  //We have a major tab so we need a name
  /* pageName: "cdrdao/2" */
  //getMessage(pageName, IDSTRSETTING_CDRDAOSETTINGS, sizeof(pageName),  hSettingsResource, hwndNotebook);
  //pageinfo.pszName = pageName;
  
  //Insert the page into the settings notebook
  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
}

/********************************************************/
/* New class function which inserts the cdrdao          */
/* page into the settings notebook                      */
/********************************************************/
BOOL CWCreatorSettings::cwAddCdrdaoOptionPage3(HWND hwndNotebook)
{
  PAGEINFO pageinfo;
  char pageName[100];

  //Clear the pageinfo structure
  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
  //Fill the pageinfo structure
  pageinfo.cb = sizeof(PAGEINFO);
  pageinfo.hwndPage = NULLHANDLE;
  pageinfo.usPageStyleFlags = BKA_STATUSTEXTON;
  pageinfo.usPageInsertFlags = BKA_FIRST;
  //We want page numbers
  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
  //The dialog procedure for this page
  pageinfo.pfnwp = settingsCdrdaoOptionDlgProc3;
  //The resource DLL
  pageinfo.resid = hSettingsResource;
  //pageinfo.resid = queryModuleHandle();
  //The ID of the dialog template
  pageinfo.dlgid = IDDLG_CDRDAOSETUP3; /* No separate help panel yet!!! */
  //We need a pointer to our WPS-object in the dialog procedure
  //to call class functions
  pageinfo.pCreateParams = this;
  //The ID of the help panel for this page
  pageinfo.idDefaultHelpPanel = IDDLG_CDRDAOSETUP3;
  //Tell the WPS the help library name
  pageinfo.pszHelpLibraryName = AFHELPLIBRARY;
  //We have a major tab so we need a name
  /* pageName: "cdrdao/2" */
  //  getMessage(pageName, IDSTRSETTING_CDRDAOSETTINGS, sizeof(pageName),  hSettingsResource, hwndNotebook);
  //pageinfo.pszName = pageName;
  
  //Insert the page into the settings notebook
  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
}

  
/********************************************************/
/* New class function which inserts the Grabber option  */
/* page into the settings notebook                      */
/********************************************************/
BOOL CWCreatorSettings::cwAddGrabOptionPage(HWND hwndNotebook)
{
  PAGEINFO pageinfo;
  char pageName[100];
      
  //Clear the pageinfo structure
  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
  //Fill the pageinfo structure
  pageinfo.cb = sizeof(PAGEINFO);
  pageinfo.hwndPage = NULLHANDLE;
  pageinfo.usPageStyleFlags =  BKA_MAJOR | BKA_STATUSTEXTON;
  //pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
  pageinfo.usPageInsertFlags = BKA_FIRST;
  //We want page numbers
  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
  //The dialog procedure for this page
  pageinfo.pfnwp = settingsGrabberOptionDlgProc;
  //The resource DLL
  pageinfo.resid = hSettingsResource;
  //pageinfo.resid = queryModuleHandle();
  pageinfo.dlgid = IDDLG_GRABBERSETUP;
  //We need a pointer to our WPS-object in the dialog procedure
  //to call class functions
  pageinfo.pCreateParams = this;
  //The ID of the help panel for this page
  pageinfo.idDefaultHelpPanel = IDDLG_GRABBERSETUP;
  //Tell the WPS the help library name
  pageinfo.pszHelpLibraryName = AFHELPLIBRARY;
  //We have a major tab so we need a name
  /* pageName: "Grabber" */
  getMessage(pageName, IDSTRSETTING_GRABBER, sizeof(pageName),  hSettingsResource, hwndNotebook);
  pageinfo.pszName = pageName;

  //Insert the page into the settings notebook
  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
}

/********************************************************/
/* New class function which inserts the mpg123 option   */
/* page into the settings notebook                      */
/********************************************************/
BOOL CWCreatorSettings::cwAddMpg123OptionPage(HWND hwndNotebook)
{
  PAGEINFO pageinfo;
  char pageName[100];

  //Clear the pageinfo structure
  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
  //Fill the pageinfo structure
  pageinfo.cb = sizeof(PAGEINFO);
  pageinfo.hwndPage = NULLHANDLE;
  // pageinfo.usPageStyleFlags =  BKA_STATUSTEXTON;
  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
  pageinfo.usPageInsertFlags = BKA_FIRST;
  //We want page numbers
  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
  //The dialog procedure for this page
  pageinfo.pfnwp = settingsMpg123OptionDlgProc;
  //The resource DLL
  pageinfo.resid = hSettingsResource;
  //pageinfo.resid = queryModuleHandle();
  pageinfo.dlgid = IDDLG_MPG123SETUP;
  //We need a pointer to our WPS-object in the dialog procedure
  //to call class functions
  pageinfo.pCreateParams = this;
  //The ID of the help panel for this page
  pageinfo.idDefaultHelpPanel = IDDLG_MPG123SETUP;
  //Tell the WPS the help library name
  pageinfo.pszHelpLibraryName = AFHELPLIBRARY;
  //We have a major tab so we need a name
  /* pageName: "Mpg123" */
  getMessage(pageName, IDSTRSETTING_MPG123, sizeof(pageName),  hSettingsResource, hwndNotebook);
  pageinfo.pszName = pageName;
  
  //Insert the page into the settings notebook
  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
}

/********************************************************/
/* New class function which inserts the mkisofs setup */
/* page into the settings notebook                      */
/********************************************************/
BOOL CWCreatorSettings::cwAddMkisofsOptionPage(HWND hwndNotebook)
{
  PAGEINFO pageinfo;
  char pageName[100];

  //Clear the pageinfo structure
  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
  //Fill the pageinfo structure
  pageinfo.cb = sizeof(PAGEINFO);
  pageinfo.hwndPage = NULLHANDLE;
  //pageinfo.usPageStyleFlags = BKA_STATUSTEXTON;
  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
  pageinfo.usPageInsertFlags = BKA_FIRST;
  //We want page numbers
  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
  //The dialog procedure for this page
  pageinfo.pfnwp = settingsMkisofsOptionDlgProc;
  //The resource DLL
  pageinfo.resid = hSettingsResource;
  pageinfo.dlgid = IDDLG_MKISOFSSETUP;
  //We need a pointer to our WPS-object in the dialog procedure
  //to call class functions
  pageinfo.pCreateParams = this;
  //The ID of the help panel for this page
  pageinfo.idDefaultHelpPanel = IDDLG_MKISOFSSETUP;
  //Tell the WPS the help library name
  pageinfo.pszHelpLibraryName = AFHELPLIBRARY;
  //We have a major tab so we need a name
  /* pageName:  "Mkisofs"*/
  getMessage(pageName, IDSTRSETTING_MKISOFSSETTINGS,sizeof(pageName),  hSettingsResource, hwndNotebook);
  pageinfo.pszName = pageName;
  
  //Insert the page into the settings notebook
  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
}

/********************************************************/
/* New class function which inserts the CDDB setup      */
/* page into the settings notebook                      */
/********************************************************/
BOOL CWCreatorSettings::cwAddCDDBOptionPage(HWND hwndNotebook)
{
  PAGEINFO pageinfo;
  char pageName[100];

  //Clear the pageinfo structure
  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
  //Fill the pageinfo structure
  pageinfo.cb = sizeof(PAGEINFO);
  pageinfo.hwndPage = NULLHANDLE;
  //pageinfo.usPageStyleFlags = BKA_STATUSTEXTON;
  pageinfo.usPageStyleFlags = BKA_MAJOR | BKA_STATUSTEXTON;
  pageinfo.usPageInsertFlags = BKA_FIRST;
  //We want page numbers
  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
  //The dialog procedure for this page
  pageinfo.pfnwp = settingsCDDBOptionDlgProc;
  //The resource DLL
  pageinfo.resid = hSettingsResource;
  pageinfo.dlgid = IDDLG_CDDBSETUP;
  //We need a pointer to our WPS-object in the dialog procedure
  //to call class functions
  pageinfo.pCreateParams = this;
  //The ID of the help panel for this page
  pageinfo.idDefaultHelpPanel = 1300;
  //Tell the WPS the help library name
  pageinfo.pszHelpLibraryName = AFHELPLIBRARY;
  //We have a major tab so we need a name
  /* pageName:  "CDDB setup" */
  getMessage(pageName, IDSTRSETTING_CDDBSETTINGS,sizeof(pageName),  hSettingsResource, hwndNotebook);
  pageinfo.pszName = pageName;
  
  //Insert the page into the settings notebook
  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
}

/********************************************************/
/* New class function which inserts the CDDB setup      */
/* page into the settings notebook                      */
/********************************************************/
BOOL CWCreatorSettings::cwAddCDDBOptionPage2(HWND hwndNotebook)
{
  PAGEINFO pageinfo;
  char pageName[100];

  //Clear the pageinfo structure
  memset((PCH)&pageinfo, 0, sizeof(PAGEINFO));
  //Fill the pageinfo structure
  pageinfo.cb = sizeof(PAGEINFO);
  pageinfo.hwndPage = NULLHANDLE;
  pageinfo.usPageStyleFlags = BKA_STATUSTEXTON;
  pageinfo.usPageInsertFlags = BKA_FIRST;
  //We want page numbers
  pageinfo.usSettingsFlags = SETTINGS_PAGE_NUMBERS;
  //The dialog procedure for this page
  pageinfo.pfnwp = settingsCDDBOptionDlgProc2;
  //The resource DLL
  pageinfo.resid = hSettingsResource;
  pageinfo.dlgid = IDDLG_CDDBSETUP2;
  //We need a pointer to our WPS-object in the dialog procedure
  //to call class functions
  pageinfo.pCreateParams = this;
  //The ID of the help panel for this page
  pageinfo.idDefaultHelpPanel = 1307;
  //Tell the WPS the help library name
  pageinfo.pszHelpLibraryName = AFHELPLIBRARY;
  //We have a major tab so we need a name
  /* pageName:  "Mkisofs"*/
  /*getMessage(pageName, IDSTRSETTING_CDDBSETTINGS,sizeof(pageName),  hSettingsResource, hwndNotebook);
  pageinfo.pszName = pageName;
  */

  //Insert the page into the settings notebook
  return wpInsertSettingsPage(hwndNotebook,&pageinfo);
}


