HeightDlg.cpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #define HEIGHTDLG_CPP
  2. /*************************************************************************************************\
  3. HeightDlg.cpp : Implementation of the HeightDlg component.
  4. //---------------------------------------------------------------------------//
  5. // Copyright (C) Microsoft Corporation. All rights reserved. //
  6. //===========================================================================//
  7. \*************************************************************************************************/
  8. #include "HeightDlg.h"
  9. #include "resource.h"
  10. HeightDlg::HeightDlg( int minZ, int maxZ)
  11. : CDialog( IDD_HEIGHT_DLG )
  12. {
  13. min = minZ;
  14. max = maxZ;
  15. }
  16. void HeightDlg::Init()
  17. {
  18. char minTxt[256];
  19. char maxTxt[256];
  20. itoa( min, minTxt, 10 );
  21. itoa( max, maxTxt, 10 );
  22. (GetDlgItem( IDC_MIN ))->SetWindowText( minTxt );
  23. (GetDlgItem( IDC_MAX ))->SetWindowText( maxTxt );
  24. }
  25. void HeightDlg::OnOK()
  26. {
  27. char minTxt[256];
  28. char maxTxt[256];
  29. (GetDlgItem( IDC_MIN ))->GetWindowText( minTxt, 256 );
  30. (GetDlgItem( IDC_MAX ))->GetWindowText( maxTxt, 256 );
  31. min = atoi( minTxt );
  32. max = atoi( maxTxt );
  33. CDialog::OnOK();
  34. }
  35. //void HeightDlg::OnCommand(Window *wnd,int nCommand)
  36. //{
  37. /* if (nCommand == BC_CLICKED)
  38. {
  39. wchar_t wcsMinTxt[256];
  40. wchar_t wcsMaxTxt[256];
  41. ((Entry*)GetDlgItem( IDC_MIN ))->GetEntry( wcsMinTxt, 256 );
  42. ((Entry*)GetDlgItem( IDC_MAX ))->GetEntry( wcsMaxTxt, 256 );
  43. char minTxt[256];
  44. char maxTxt[256];
  45. WcsToStr( minTxt, wcsMinTxt );
  46. WcsToStr( maxTxt, wcsMaxTxt );
  47. min = atoi( minTxt );
  48. max = atoi( maxTxt );
  49. EndDialog(wnd->GetID());
  50. }*/
  51. //}
  52. //*************************************************************************************************
  53. // end of file ( HeightDlg.cpp )