MixCombiningDialog.cpp 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. // MixCombiningDialog.cpp : implementation file
  19. //
  20. #include "stdafx.h"
  21. #include "MixViewer.h"
  22. #include "MixCombiningDialog.h"
  23. #ifdef _DEBUG
  24. #define new DEBUG_NEW
  25. #undef THIS_FILE
  26. static char THIS_FILE[] = __FILE__;
  27. #endif
  28. /////////////////////////////////////////////////////////////////////////////
  29. //
  30. // MixCombiningDialogClass
  31. //
  32. /////////////////////////////////////////////////////////////////////////////
  33. MixCombiningDialogClass::MixCombiningDialogClass(CWnd* pParent /*=NULL*/)
  34. : CDialog(MixCombiningDialogClass::IDD, pParent)
  35. {
  36. //{{AFX_DATA_INIT(MixCombiningDialogClass)
  37. // NOTE: the ClassWizard will add member initialization here
  38. //}}AFX_DATA_INIT
  39. return ;
  40. }
  41. /////////////////////////////////////////////////////////////////////////////
  42. //
  43. // DoDataExchange
  44. //
  45. /////////////////////////////////////////////////////////////////////////////
  46. void
  47. MixCombiningDialogClass::DoDataExchange (CDataExchange *pDX)
  48. {
  49. CDialog::DoDataExchange(pDX);
  50. //{{AFX_DATA_MAP(MixCombiningDialogClass)
  51. DDX_Control(pDX, IDC_PROGRESS, ProgressCtrl);
  52. //}}AFX_DATA_MAP
  53. return ;
  54. }
  55. BEGIN_MESSAGE_MAP(MixCombiningDialogClass, CDialog)
  56. //{{AFX_MSG_MAP(MixCombiningDialogClass)
  57. //}}AFX_MSG_MAP
  58. END_MESSAGE_MAP()
  59. /////////////////////////////////////////////////////////////////////////////
  60. //
  61. // OnInitDialog
  62. //
  63. /////////////////////////////////////////////////////////////////////////////
  64. BOOL
  65. MixCombiningDialogClass::OnInitDialog (void)
  66. {
  67. CDialog::OnInitDialog ();
  68. ProgressCtrl.SetPos (0);
  69. ProgressCtrl.SetRange (0, 100);
  70. return TRUE;
  71. }
  72. /////////////////////////////////////////////////////////////////////////////
  73. //
  74. // Set_Status_Text
  75. //
  76. /////////////////////////////////////////////////////////////////////////////
  77. void
  78. MixCombiningDialogClass::Set_Status_Text (const char *text)
  79. {
  80. while (!::IsWindow(m_hWnd)) {}
  81. SetDlgItemText (IDC_STATUS, text);
  82. return ;
  83. }
  84. /////////////////////////////////////////////////////////////////////////////
  85. //
  86. // Set_Progress_Percent
  87. //
  88. /////////////////////////////////////////////////////////////////////////////
  89. void
  90. MixCombiningDialogClass::Set_Progress_Percent (float percent)
  91. {
  92. while (!::IsWindow(m_hWnd)) {}
  93. ProgressCtrl.SetPos ((int)(percent * 100.0f));
  94. return ;
  95. }
  96. /////////////////////////////////////////////////////////////////////////////
  97. //
  98. // Set_Title
  99. //
  100. /////////////////////////////////////////////////////////////////////////////
  101. void MixCombiningDialogClass::Set_Title(const char *text)
  102. {
  103. while (!::IsWindow(m_hWnd)) {}
  104. SetWindowText(text);
  105. }