FormClass.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. ** Command & Conquer Generals(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. /***********************************************************************************************
  19. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : max2w3d *
  23. * *
  24. * $Archive:: /Commando/Code/Tools/max2w3d/FormClass.h $*
  25. * *
  26. * Author:: Greg Hjelstrom *
  27. * *
  28. * $Modtime:: 11/13/98 9:34a $*
  29. * *
  30. * $Revision:: 3 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #if defined(_MSC_VER)
  36. #pragma once
  37. #endif
  38. #ifndef __FORMCLASS_H
  39. #define __FORMCLASS_H
  40. #include <Max.h>
  41. class FormClass : public ParamDlg
  42. {
  43. public:
  44. FormClass (void)
  45. : m_hWnd (NULL) {}
  46. ~FormClass (void) {}
  47. HWND Create_Form (HWND parent_wnd, UINT template_id);
  48. void Show (bool show_flag = true) { ::ShowWindow (m_hWnd, show_flag ? SW_SHOW : SW_HIDE); }
  49. virtual BOOL Dialog_Proc (HWND dlg_wnd, UINT message, WPARAM wparam, LPARAM lparam) = 0;
  50. HWND Get_Hwnd(void) { return m_hWnd; }
  51. virtual void Invalidate(void) { InvalidateRect(m_hWnd,NULL,0); }
  52. protected:
  53. BOOL ExecuteDlgInit(LPVOID lpResource);
  54. BOOL ExecuteDlgInit(LPCTSTR lpszResourceName);
  55. static BOOL WINAPI fnFormProc (HWND dlg_wnd, UINT message, WPARAM wparam, LPARAM lparam);
  56. HWND m_hWnd;
  57. RECT m_FormRect;
  58. };
  59. #endif //__FORMCLASS_H