home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / sdktools / winnt / perfmon / dialogs.c < prev    next >
C/C++ Source or Header  |  1997-10-05  |  18KB  |  544 lines

  1. /*****************************************************************************
  2.  *
  3.  *  Dialogs.c - This module handles the Menu and Dialog user interactions.
  4.  *
  5.  *  Microsoft Confidential
  6.  *  Copyright (c) 1992-1997 Microsoft Corporation
  7.  *
  8.  ****************************************************************************/
  9.  
  10. #include <stdio.h>
  11. #include <wchar.h>   // for swscanf
  12.  
  13. #include "perfmon.h"
  14. #include "perfmops.h"      // for ConvertDecimalPoint
  15.  
  16. #include "alert.h"     // for SetAlertTimer, AlertData
  17. #include "graph.h"
  18. #include "cderr.h"
  19. #include "utils.h"
  20. #include "playback.h"  // for PlayingBackLog
  21. #include "grafdisp.h"  // for ToggleGraphRefresh
  22. #include "pmhelpid.h"  // Help IDs
  23.  
  24.  
  25. BOOL          LocalManualRefresh ;
  26.  
  27.  
  28. /***************************************************************************/
  29. BOOL FAR PASCAL GraphOptionDlg(HWND hDlg, WORD msg, DWORD wParam, LONG lParam)
  30. /***************************************************************************/
  31. {
  32. static GRAPH_OPTIONS goLocalCopy ;
  33.  
  34. INT            iTimeMilliseconds ;
  35. TCHAR          szBuff[MiscTextLen] ;
  36. PGRAPHSTRUCT   lgraph;
  37.  
  38.    lParam ;
  39.    lgraph = pGraphs;
  40.  
  41.    switch(msg)
  42.       {
  43.  
  44.       case WM_INITDIALOG:
  45.  
  46.          dwCurrentDlgID = HC_PM_idDlgOptionChart ;
  47.  
  48.          // Init the Radio button, Check boxes and text fields.
  49.  
  50.          goLocalCopy.iGraphOrHistogram =
  51.             lgraph->gOptions.iGraphOrHistogram ;
  52.          if (lgraph->gOptions.iGraphOrHistogram == LINE_GRAPH)
  53.             CheckRadioButton(hDlg, ID_GRAPH, ID_HISTOGRAM, ID_GRAPH) ;
  54.          else
  55.             CheckRadioButton(hDlg, ID_GRAPH, ID_HISTOGRAM, ID_HISTOGRAM) ;
  56.  
  57.          CheckDlgButton(hDlg, ID_LEGEND, lgraph->gOptions.bLegendChecked) ;
  58.          if (!(lgraph->gOptions.bLegendChecked))
  59.             {
  60.             // can't display valuebar w/o legend
  61.             DialogEnable (hDlg, IDD_CHARTOPTIONSVALUEBAR, FALSE) ;
  62.             }
  63.  
  64.          CheckDlgButton(hDlg, ID_LABELS, lgraph->gOptions.bLabelsChecked) ;
  65.          CheckDlgButton(hDlg, ID_VERT_GRID, lgraph->gOptions.bVertGridChecked) ;
  66.          CheckDlgButton(hDlg, ID_HORZ_GRID, lgraph->gOptions.bHorzGridChecked) ;
  67.          CheckDlgButton(hDlg, IDD_CHARTOPTIONSVALUEBAR,
  68.             lgraph->gOptions.bStatusBarChecked) ;
  69.  
  70.          TSPRINTF(szBuff, TEXT("%d"), lgraph->gOptions.iVertMax) ;
  71.          SendDlgItemMessage(hDlg, ID_VERT_MAX, WM_SETTEXT, 0, (LONG) szBuff) ;
  72.  
  73.          TSPRINTF(szBuff, TEXT("%3.3f"), lgraph->gOptions.eTimeInterval) ;
  74.          ConvertDecimalPoint (szBuff) ;
  75.          SendDlgItemMessage(hDlg, IDD_CHARTOPTIONSINTERVAL, WM_SETTEXT, 0, (LONG) szBuff) ;
  76.  
  77.          // Pickup a local copy of the Graph Options.
  78.  
  79.          goLocalCopy = lgraph->gOptions ;
  80.          LocalManualRefresh = lgraph->bManualRefresh ;
  81.  
  82.          if (PlayingBackLog())
  83.             {
  84.             DialogEnable (hDlg, IDD_CHARTOPTIONSPERIODIC, FALSE) ;
  85.             DialogEnable (hDlg, IDD_CHARTOPTIONSUPDATETEXT, FALSE) ;
  86.             DialogEnable (hDlg, IDD_CHARTOPTIONSMANUALREFRESH, FALSE) ;
  87.             }
  88.          else
  89.             {
  90.             CheckRadioButton (hDlg,
  91.                IDD_CHARTOPTIONSMANUALREFRESH,
  92.                IDD_CHARTOPTIONSPERIODIC,
  93.                LocalManualRefresh ? IDD_CHARTOPTIONSMANUALREFRESH :
  94.                IDD_CHARTOPTIONSPERIODIC) ;
  95.             }
  96.  
  97.          if (lgraph->bManualRefresh || PlayingBackLog())
  98.             {
  99.             DialogEnable (hDlg, IDD_CHARTOPTIONSINTERVALTEXT, FALSE) ;
  100.             DialogEnable (hDlg, IDD_CHARTOPTIONSINTERVAL, FALSE) ;
  101.             }
  102.          else
  103.             {
  104.             DialogEnable (hDlg, IDD_CHARTOPTIONSINTERVALTEXT, TRUE) ;
  105.             DialogEnable (hDlg, IDD_CHARTOPTIONSINTERVAL, TRUE) ;
  106.             }
  107.  
  108.          EditSetLimit (GetDlgItem(hDlg, ID_VERT_MAX),
  109.             sizeof(szBuff) / sizeof(TCHAR) - 1) ;
  110.  
  111.          EditSetLimit (GetDlgItem(hDlg, IDD_CHARTOPTIONSINTERVAL),
  112.             ShortTextLen) ;
  113.  
  114.          WindowCenter (hDlg) ;
  115.          return(TRUE);
  116.  
  117.       case WM_COMMAND:
  118.          switch(LOWORD(wParam))
  119.             {
  120.             case ID_VERT_MAX:
  121.                if (HIWORD(wParam) == EN_CHANGE)
  122.                   {
  123.                   DialogText(hDlg, ID_VERT_MAX, szBuff) ;
  124.                   swscanf(szBuff, TEXT("%d"), &goLocalCopy.iVertMax) ;
  125.                   }
  126.                break ;
  127.  
  128.  
  129.             case IDD_CHARTOPTIONSINTERVAL:
  130.                if (HIWORD(wParam) == EN_CHANGE)
  131.                   {
  132.                   goLocalCopy.eTimeInterval =
  133.                      DialogFloat (hDlg, IDD_CHARTOPTIONSINTERVAL, NULL) ;
  134.                   }
  135.                break ;
  136.  
  137.             case IDD_CHARTOPTIONSPERIODIC:
  138.             case IDD_CHARTOPTIONSMANUALREFRESH:
  139.                // check if the Manual refresh is currently checked.
  140.                // Then toggle the ManualRefresh button
  141.                LocalManualRefresh =
  142.                   (LOWORD(wParam) == IDD_CHARTOPTIONSMANUALREFRESH) ;
  143.  
  144.                CheckRadioButton (hDlg,
  145.                   IDD_CHARTOPTIONSMANUALREFRESH,
  146.                   IDD_CHARTOPTIONSPERIODIC,
  147.                   LocalManualRefresh ? IDD_CHARTOPTIONSMANUALREFRESH :
  148.                   IDD_CHARTOPTIONSPERIODIC) ;
  149.  
  150.                // gray out time interval if necessary...
  151.                DialogEnable (hDlg, IDD_CHARTOPTIONSINTERVALTEXT,
  152.                   !LocalManualRefresh) ;
  153.                DialogEnable (hDlg, IDD_CHARTOPTIONSINTERVAL,
  154.                   !LocalManualRefresh) ;
  155.                break ;
  156.  
  157.             case IDD_CHARTOPTIONSVALUEBAR:
  158.                if (goLocalCopy.bStatusBarChecked == TRUE)
  159.                   goLocalCopy.bStatusBarChecked = FALSE ;
  160.                else
  161.                   goLocalCopy.bStatusBarChecked = TRUE ;
  162.                break ;
  163.  
  164.  
  165.             case ID_LEGEND:
  166.                if (goLocalCopy.bLegendChecked == TRUE)
  167.                   goLocalCopy.bLegendChecked = FALSE ;
  168.                else
  169.                   goLocalCopy.bLegendChecked = TRUE ;
  170.  
  171.                DialogEnable (hDlg, IDD_CHARTOPTIONSVALUEBAR,
  172.                   goLocalCopy.bLegendChecked) ;
  173.  
  174.                break ;
  175.  
  176.  
  177.             case ID_LABELS:
  178.                if (goLocalCopy.bLabelsChecked == TRUE)
  179.                   goLocalCopy.bLabelsChecked = FALSE ;
  180.                else
  181.                   goLocalCopy.bLabelsChecked = TRUE ;
  182.                break ;
  183.  
  184.  
  185.             case ID_VERT_GRID:
  186.                if (goLocalCopy.bVertGridChecked == TRUE)
  187.                   goLocalCopy.bVertGridChecked = FALSE ;
  188.                else
  189.                   goLocalCopy.bVertGridChecked = TRUE ;
  190.                break ;
  191.  
  192.  
  193.             case ID_HORZ_GRID:
  194.                if (goLocalCopy.bHorzGridChecked == TRUE)
  195.                   goLocalCopy.bHorzGridChecked = FALSE ;
  196.                else
  197.                   goLocalCopy.bHorzGridChecked = TRUE ;
  198.                break ;
  199.  
  200.  
  201.             case ID_GRAPH:
  202.             case ID_HISTOGRAM:
  203.                if (LOWORD(wParam) == ID_GRAPH)
  204.                   {
  205.                   goLocalCopy.iGraphOrHistogram = LINE_GRAPH ;
  206.                   }
  207.                else
  208.                   {
  209.                   goLocalCopy.iGraphOrHistogram = BAR_GRAPH ;
  210.                   }
  211.                CheckRadioButton(hDlg, ID_GRAPH, ID_HISTOGRAM,
  212.                   goLocalCopy.iGraphOrHistogram == LINE_GRAPH ?
  213.                   ID_GRAPH : ID_HISTOGRAM) ;
  214.  
  215.                break ;
  216.  
  217.             case IDOK:
  218.                //  verify some numeric entries first
  219.                if (goLocalCopy.iVertMax > MAX_VERTICAL ||
  220.                    goLocalCopy.iVertMax < MIN_VERTICAL)
  221.                   {
  222.                   DlgErrorBox (hDlg, ERR_BADVERTMAX) ;
  223.                   SetFocus (DialogControl (hDlg, ID_VERT_MAX)) ;
  224.                   EditSetTextEndPos (hDlg, ID_VERT_MAX) ;
  225.                   return (FALSE) ;
  226.                   break ;
  227.                   }
  228.                if (goLocalCopy.eTimeInterval > MAX_INTERVALSEC ||
  229.                    goLocalCopy.eTimeInterval < MIN_INTERVALSEC)
  230.                   {
  231.                   DlgErrorBox (hDlg, ERR_BADTIMEINTERVAL) ;
  232.                   SetFocus (DialogControl (hDlg, IDD_CHARTOPTIONSINTERVAL)) ;
  233.                   EditSetTextEndPos (hDlg, IDD_CHARTOPTIONSINTERVAL) ;
  234.                   return (FALSE) ;
  235.                   break ;
  236.                   }
  237.  
  238.                // We need to send a size message to the main window
  239.                // so it can setup the redraw of the graph and legend.
  240.  
  241.                lgraph->gOptions.bLegendChecked    = goLocalCopy.bLegendChecked ;
  242.                lgraph->gOptions.bStatusBarChecked = goLocalCopy.bStatusBarChecked ;
  243.  
  244.                if (lgraph->gOptions.eTimeInterval != goLocalCopy.eTimeInterval
  245.                   && !LocalManualRefresh)
  246.                   {
  247.                   iTimeMilliseconds = (INT) (goLocalCopy.eTimeInterval * (FLOAT) 1000.0) ;
  248.                   pGraphs->gInterval = iTimeMilliseconds ;
  249.                   if (!PlayingBackLog())
  250.                      {
  251.                      SetGraphTimer(pGraphs) ;
  252.                      }
  253.                   lgraph->bManualRefresh = LocalManualRefresh ;
  254.  
  255.                   }
  256.                else if (LocalManualRefresh != lgraph->bManualRefresh)
  257.                   {
  258.                   ToggleGraphRefresh (hWndGraph) ;
  259.                   }
  260.                // Assign the local copy of the graph options to the
  261.                // global copy.
  262.  
  263.                lgraph->gOptions = goLocalCopy ;
  264.  
  265.                SizeGraphComponents (hWndGraph) ;
  266.                WindowInvalidate (hWndGraph) ;
  267.                dwCurrentDlgID = 0 ;
  268.                EndDialog (hDlg, 1) ;
  269.                return (TRUE) ;
  270.                break ;
  271.  
  272.  
  273.             case IDCANCEL:
  274.                dwCurrentDlgID = 0 ;
  275.                EndDialog(hDlg,0);
  276.                return(TRUE);
  277.  
  278.             case ID_HELP:
  279.                CallWinHelp (dwCurrentDlgID) ;
  280.                break ;
  281.  
  282.             default:
  283.                break;
  284.             }
  285.          break;
  286.  
  287.       default:
  288.          break;
  289.  
  290.       }
  291.    return(FALSE);
  292.    }
  293.  
  294.  
  295.  
  296.  
  297. DWORD          iIntervalMSecs ;
  298.  
  299. void static OnAlertOptionDlgInit (HWND hDlg, PALERT pAlert)
  300.    {
  301.    BOOL           EnableFlag ;
  302.  
  303.    iIntervalMSecs = pAlert->iIntervalMSecs ;
  304.    
  305.    LocalManualRefresh = pAlert->bManualRefresh ;
  306.    
  307.    if (PlayingBackLog())
  308.       {
  309.       // When playingback log, disable all controls except 
  310.       // the alert interval
  311.       //
  312.       EnableFlag = TRUE ;
  313.       DialogEnable (hDlg, IDD_ALERTOPTIONSMANUALREFRESH, FALSE) ;
  314.       DialogEnable (hDlg, IDD_ALERTOPTIONSPOPUP, FALSE) ;
  315.       DialogEnable (hDlg, IDD_ALERTOPTIONSNETWORKALERT, FALSE) ;
  316.       DialogEnable (hDlg, IDD_ALERTOPTIONSNETGROUPTEXT, FALSE) ;
  317.       DialogEnable (hDlg, IDD_ALERTOPTIONSMSGNAME, FALSE) ;
  318.       DialogEnable (hDlg, IDD_ALERTOPTIONSMSGNAMETEXT, FALSE) ;
  319.       }
  320.    else
  321.       {
  322.       EnableFlag = !LocalManualRefresh ;
  323.       DialogEnable (hDlg, IDD_ALERTOPTIONSMSGNAME, pAlert->bNetworkAlert) ;
  324.       DialogEnable (hDlg, IDD_ALERTOPTIONSMSGNAMETEXT, pAlert->bNetworkAlert) ;
  325.       }
  326.  
  327.    // setup the Update time interval group items
  328.    DialogSetInterval (hDlg, IDD_ALERTOPTIONSINTERVAL, iIntervalMSecs) ;
  329.    DialogEnable (hDlg, IDD_ALERTOPTIONSINTERVAL, EnableFlag) ;
  330.    DialogEnable (hDlg, IDD_ALERTOPTIONSINTERVALTEXT, EnableFlag) ;
  331.    CheckRadioButton(hDlg, IDD_ALERTOPTIONSMANUALREFRESH,
  332.       IDD_ALERTOPTIONSPERIODIC,
  333.       !EnableFlag ? IDD_ALERTOPTIONSMANUALREFRESH : IDD_ALERTOPTIONSPERIODIC) ;
  334.  
  335.    CheckDlgButton (hDlg, IDD_ALERTOPTIONSEVENTLOG, pAlert->bEventLog) ;
  336.    CheckDlgButton (hDlg, IDD_ALERTOPTIONSPOPUP, pAlert->bSwitchToAlert) ;
  337.    CheckDlgButton (hDlg, IDD_ALERTOPTIONSNETWORKALERT, pAlert->bNetworkAlert) ;
  338.  
  339.    if (pAlert->MessageName[0])
  340.       {
  341.       DialogSetString (hDlg, IDD_ALERTOPTIONSMSGNAME, pAlert->MessageName) ;
  342.       }
  343.          
  344.    EditSetLimit (GetDlgItem(hDlg, IDD_ALERTOPTIONSMSGNAME),
  345.       sizeof(pAlert->MessageName)/sizeof(TCHAR) - 1) ;
  346.  
  347.    dwCurrentDlgID = HC_PM_idDlgOptionAlert ;
  348.  
  349.    WindowCenter (hDlg) ;
  350.  
  351.    }  // OnAlertOptionDlgInit
  352.  
  353. BOOL FAR PASCAL AlertOptionDlg (HWND hDlg, WORD msg, 
  354.                                 DWORD wParam, LONG lParam)
  355.    {
  356.  
  357.    PALERT         pAlert ;
  358.  
  359.    switch(msg)
  360.       {
  361.  
  362.       case WM_INITDIALOG:
  363.          pAlert = (PALERT) lParam ;
  364.          OnAlertOptionDlgInit (hDlg, pAlert) ;
  365.          return(TRUE);
  366.  
  367.        case WM_COMMAND:
  368.          switch(LOWORD(wParam))
  369.             {
  370.             case IDOK:
  371.                {
  372.                FLOAT eTimeInterval ;
  373.  
  374.                pAlert = AlertData (hWndAlert) ;
  375.  
  376.                eTimeInterval = DialogFloat (hDlg, IDD_ALERTOPTIONSINTERVAL, NULL) ;
  377.  
  378.                if (eTimeInterval > MAX_INTERVALSEC ||
  379.                    eTimeInterval < MIN_INTERVALSEC)
  380.                   {
  381.                   DlgErrorBox (hDlg, ERR_BADTIMEINTERVAL) ;
  382.                   SetFocus (DialogControl (hDlg, IDD_ALERTOPTIONSINTERVAL)) ;
  383.                   EditSetTextEndPos (hDlg, IDD_ALERTOPTIONSINTERVAL) ;
  384.                   return (FALSE) ;
  385.                   break ;
  386.                   }
  387.  
  388.                eTimeInterval = eTimeInterval * (FLOAT) 1000.0 +
  389.                    (FLOAT) 0.5 ;
  390.  
  391.                iIntervalMSecs = (DWORD) eTimeInterval ;
  392.  
  393.                pAlert->bNetworkAlert =
  394.                   IsDlgButtonChecked (hDlg, IDD_ALERTOPTIONSNETWORKALERT) ;
  395.  
  396.                pAlert->bSwitchToAlert =
  397.                   IsDlgButtonChecked (hDlg, IDD_ALERTOPTIONSPOPUP) ;
  398.  
  399.                pAlert->bEventLog =
  400.                   IsDlgButtonChecked (hDlg, IDD_ALERTOPTIONSEVENTLOG) ;
  401.  
  402.  
  403.  
  404.                if (!PlayingBackLog())
  405.                   {
  406.                   DialogText (hDlg,
  407.                      IDD_ALERTOPTIONSMSGNAME,
  408.                      pAlert->MessageName) ;
  409.                   }
  410.  
  411.                dwCurrentDlgID = 0 ;
  412.                EndDialog (hDlg, 1) ;
  413.                }
  414.                break ;
  415.  
  416.             case IDCANCEL:
  417.                dwCurrentDlgID = 0 ;
  418.                EndDialog(hDlg,0);
  419.                return(TRUE);
  420.             
  421.             case IDD_ALERTOPTIONSPERIODIC:
  422.             case IDD_ALERTOPTIONSMANUALREFRESH:
  423.  
  424.                if (!PlayingBackLog())
  425.                   {
  426.                   // check if the Manual refresh is currently checked.
  427.                   // Then toggle the ManualRefresh button
  428.                   LocalManualRefresh =
  429.                      (LOWORD(wParam) == IDD_ALERTOPTIONSMANUALREFRESH) ;
  430.  
  431.                   CheckRadioButton(hDlg,
  432.                      IDD_ALERTOPTIONSMANUALREFRESH,
  433.                      IDD_ALERTOPTIONSPERIODIC,
  434.                      LocalManualRefresh ? IDD_ALERTOPTIONSMANUALREFRESH :
  435.                      IDD_ALERTOPTIONSPERIODIC) ;
  436.  
  437.                      DialogEnable (hDlg,
  438.                         IDD_ALERTOPTIONSINTERVAL,
  439.                         !LocalManualRefresh) ;
  440.  
  441.                      DialogEnable (hDlg,
  442.                         IDD_ALERTOPTIONSINTERVALTEXT,
  443.                         !LocalManualRefresh) ;
  444.                   }
  445.  
  446.                break ;
  447. #if 0
  448.             case IDD_ALERTOPTIONSPOPUP:
  449.                bSwitchToAlert = !bSwitchToAlert ;
  450.                CheckDlgButton (hDlg, IDD_ALERTOPTIONSPOPUP, bSwitchToAlert) ;
  451.                break;
  452. #endif
  453.  
  454.             case IDD_ALERTOPTIONSNETWORKALERT:
  455.                {
  456.                BOOL  bNetworkAlert ;
  457.  
  458.                bNetworkAlert =
  459.                   IsDlgButtonChecked (hDlg, IDD_ALERTOPTIONSNETWORKALERT) ;
  460.  
  461.                DialogEnable (hDlg, IDD_ALERTOPTIONSMSGNAME, bNetworkAlert) ;
  462.                DialogEnable (hDlg, IDD_ALERTOPTIONSMSGNAMETEXT, bNetworkAlert) ;
  463.  
  464.                if (bNetworkAlert)
  465.                   {
  466.                   SetFocus (GetDlgItem(hDlg, IDD_ALERTOPTIONSMSGNAME)) ;
  467.                   SendDlgItemMessage(hDlg, IDD_ALERTOPTIONSMSGNAME,
  468.                      EM_SETSEL, 0, 16) ;
  469.                   }
  470.                }
  471.                break;
  472.  
  473.             case IDD_DISPLAYHELP:
  474.                CallWinHelp (dwCurrentDlgID) ;
  475.                break ;
  476.  
  477.             default:
  478.                break;
  479.             }
  480.          break;
  481.  
  482.  
  483.        default:
  484.           break;
  485.  
  486.       }
  487.  
  488.    return (FALSE);
  489.    }  // AlertOptionDlg
  490.  
  491.  
  492. BOOL DisplayAlertOptions (HWND hWndParent,
  493.                            HWND hWndAlert)
  494.    {  // DisplayAlertOptions
  495.    PALERT        pAlert ;
  496.  
  497.    pAlert = AlertData (hWndParent) ;
  498.  
  499.    if (DialogBoxParam (hInstance, idDlgAlertOptions, 
  500.                        hWndParent, (DLGPROC) AlertOptionDlg, 
  501.                        (LPARAM) pAlert))
  502.       {  // if
  503.       
  504.       if (pAlert->bNetworkAlert && pAlert->hNetAlertThread == 0)
  505.          {
  506.          AlertCreateThread (pAlert) ;
  507.          }
  508.  
  509.       if (PlayingBackLog())
  510.          {
  511.          if (pAlert->iIntervalMSecs != iIntervalMSecs)
  512.             {
  513.             // a new time interval, re-do the backing back log
  514.             // using the new value...
  515.             pAlert->iIntervalMSecs = iIntervalMSecs ;
  516.             DialogSetInterval (hWndAlert, IDD_ALERTINTERVAL, iIntervalMSecs) ;
  517.             if (pAlert->pLineFirst)
  518.                {
  519.                PlaybackAlert (hWndAlert, 0) ;
  520.                WindowInvalidate (hWndAlert) ;
  521.                }
  522.             }
  523.          }
  524.       else if (LocalManualRefresh != pAlert->bManualRefresh)
  525.          {
  526.          if (!LocalManualRefresh)
  527.             {
  528.             pAlert->iIntervalMSecs = iIntervalMSecs ;
  529.             DialogSetInterval (hWndAlert, IDD_ALERTINTERVAL, iIntervalMSecs) ;
  530.             }
  531.          ToggleAlertRefresh (hWndAlert) ;
  532.          }
  533.       else if (!LocalManualRefresh)
  534.          {
  535.          pAlert->iIntervalMSecs = iIntervalMSecs ;
  536.          SetAlertTimer (pAlert) ;
  537.          DialogSetInterval (hWndAlert, IDD_ALERTINTERVAL, iIntervalMSecs) ;
  538.          }
  539.       }  // if
  540.  
  541.    return (TRUE) ;
  542.    }  // DisplayAlertOptions
  543.  
  544.