#include <windows.h>#include "windlg.h"#include "dlgproc.h"#include "nmlperf.hh"#include "nmlperf.rh"#include "win_prnt.hh"#include "rcs_prnt.hh"Include dependency graph for perf_dlg.cc:

Go to the source code of this file.
Functions | |
| BOOL | handle_command (HWND hwndDlg, long id, HWND hwndCtl, long wNotifyCode) |
| BOOL CALLBACK | main_window_dialog_proc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) |
Variables | |
| HWND | rcs_print_window |
| char | config_file [256] |
| char | hostname [256] |
| DISPLAY_MODE | display_mode |
| int | detailed_output |
| int | iterations |
| int | increments |
| int | master |
| int | check_match |
|
||||||||||||||||||||
|
Definition at line 66 of file perf_dlg.cc. Referenced by main_window_dialog_proc().
00067 {
00068 BOOL error_flag;
00069
00070 switch (id)
00071 {
00072 case IDC_START_BUTTON:
00073 GetDlgItemText (hwndDlg, IDC_CONFIG_FILE_EDIT, config_file, 256);
00074 GetDlgItemText (hwndDlg, IDC_HOSTNAME_EDIT, hostname, 256);
00075 iterations =
00076 GetDlgItemInt (hwndDlg, IDC_ITERATIONS_EDIT, &error_flag, FALSE);
00077 increments =
00078 GetDlgItemInt (hwndDlg, IDC_INCREMENTS_EDIT, &error_flag, FALSE);
00079 detailed_output =
00080 IsDlgButtonChecked (hwndDlg, IDC_DETAILED_OUT_CHECKBOX);
00081 master = IsDlgButtonChecked (hwndDlg, IDC_MASTER_CHECKBOX);
00082 check_match = IsDlgButtonChecked (hwndDlg, IDC_CHECKMATCH_CHECKBOX);
00083 EnableWindow (GetDlgItem (hwndDlg, IDC_STOP_BUTTON), TRUE);
00084 EnableWindow (GetDlgItem (hwndDlg, IDC_START_BUTTON), FALSE);
00085 SetActiveWindow (rcs_print_window);
00086 nmlperf (config_file, hostname, master, iterations, increments,
00087 detailed_output, display_mode, 0, check_match, 10000);
00088 EnableWindow (GetDlgItem (hwndDlg, IDC_START_BUTTON), TRUE);
00089 EnableWindow (GetDlgItem (hwndDlg, IDC_STOP_BUTTON), FALSE);
00090 SetActiveWindow (hwndDlg);
00091 return 1;
00092
00093 case IDC_STOP_BUTTON:
00094 nmlperf_stop ();
00095 return 1;
00096
00097 case IDC_BPS_DISPLAY_RADIO:
00098 display_mode = BYTES_PER_SEC_MODE;
00099 break;
00100
00101 case IDC_MPS_DISPLAY_RADIO:
00102 display_mode = MSG_PER_SEC_MODE;
00103 break;
00104 default:
00105 return 0;
00106 }
00107 return (0);
00108 }
|
|
||||||||||||||||||||
|
Definition at line 25 of file perf_dlg.cc. 00026 {
00027 long idItem;
00028 HWND hwndCtl;
00029 long wNotifyCode;
00030 switch (msg)
00031 {
00032 case WM_INITDIALOG:
00033 display_mode = BYTES_PER_SEC_MODE;
00034 detailed_output = 0;
00035 CheckDlgButton (hwndDlg, IDC_BPS_DISPLAY_RADIO, 1);
00036 CheckDlgButton (hwndDlg, IDC_DETAILED_OUT_CHECKBOX, 0);
00037 rcs_print_window =
00038 create_rcs_print_window (hWinDlgInstance, SW_SHOW, NULL);
00039 rcs_print ("NMLPERF For Windows.\n");
00040 SetActiveWindow (hwndDlg);
00041 break;
00042
00043 case WM_COMMAND:
00044 idItem = wParam;
00045 hwndCtl = (HWND) LOWORD (lParam);
00046 wNotifyCode = HIWORD (lParam);
00047 return handle_command (hwndDlg, idItem, hwndCtl, wNotifyCode);
00048 case WM_SYSCOMMAND:
00049 switch (wParam)
00050 {
00051 case SC_CLOSE:
00052 WinDlgExit ();
00053 return 1;
00054 default:
00055 return 0;
00056 }
00057
00058 default:
00059 return 0;
00060 }
00061 return 0;
00062 }
|
|
|
Definition at line 13 of file perf_dlg.cc. |
|
|
Definition at line 15 of file perf_dlg.cc. |
|
|
Definition at line 16 of file perf_dlg.cc. |
|
|
Definition at line 17 of file perf_dlg.cc. |
|
|
Definition at line 18 of file perf_dlg.cc. |
|
|
Definition at line 19 of file perf_dlg.cc. |
|
|
Definition at line 20 of file perf_dlg.cc. |
|
|
Definition at line 21 of file perf_dlg.cc. |
|
|
Definition at line 22 of file perf_dlg.cc. |
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001