home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / tybc4 / clsxprt2 / tfrmtdlg.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-06  |  1.5 KB  |  75 lines

  1. /*  Project clsxprt2
  2.     
  3.     Copyright ⌐ 1993. All Rights Reserved.
  4.  
  5.     SUBSYSTEM:    clsxprt2.exe Application
  6.     FILE:         tfrmtdlg.cpp
  7.     AUTHOR:       
  8.  
  9.  
  10.     OVERVIEW
  11.     ========
  12.     Source file for implementation of TFrmtDialog (TDialog).      
  13. */
  14.  
  15. #include <owl\owlpch.h>
  16. #pragma hdrstop
  17.  
  18. #include "tfrmtdlg.h"
  19.  
  20.  
  21. //{{TFrmtDialog Implementation}}
  22.  
  23. DEFINE_RESPONSE_TABLE1(TFrmtDialog, TDialog)
  24.     EV_COMMAND(IDOK, CmOk),
  25. END_RESPONSE_TABLE;
  26.  
  27.  
  28. TFrmtDialog::TFrmtDialog (TWindow* parent, TResId resId, TModule* module):
  29.     TDialog(parent, resId, module)
  30. {
  31.     // INSERT>> Your constructor code here.
  32.  
  33. }
  34.  
  35.  
  36. TFrmtDialog::~TFrmtDialog ()
  37. {
  38.     Destroy();
  39.  
  40.     // INSERT>> Your destructor code here.
  41.  
  42. }
  43.  
  44.  
  45. BOOL TFrmtDialog::EvInitDialog (HWND hWndFocus)
  46. {
  47.     BOOL result;
  48.  
  49.      result = TDialog::EvInitDialog(hWndFocus);
  50.  
  51.     // INSERT>> Your code here.
  52.     CheckRadioButton(IDC_MMDDYY_RBT, IDC_YYMMDD_RBT,
  53.                      IDC_MMDDYY_RBT);
  54.     CheckRadioButton(IDC_24HR_RBT, IDC_AMPM_RBT,
  55.                      IDC_24HR_RBT);
  56.  
  57.     return result;
  58. }
  59.  
  60. void TFrmtDialog::CmOk()
  61. {
  62.     // save date format
  63.     if (IsDlgButtonChecked(IDC_MMDDYY_RBT))
  64.       df = clsxprt2App::mmddyy;
  65.     else if (IsDlgButtonChecked(IDC_DDMMYY_RBT))
  66.       df = clsxprt2App::ddmmyy;
  67.     else
  68.       df = clsxprt2App::yymmdd;
  69.  
  70.     // save time format
  71.     IsAmPm = (IsDlgButtonChecked(IDC_AMPM_RBT)) ?
  72.                                            TRUE : FALSE;
  73.     TDialog::CmOk();
  74. }
  75.