Custom.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //----------------------------------------------------------------------------
  2. #ifndef CustomH
  3. #define CustomH
  4. //----------------------------------------------------------------------------
  5. #include <System.Classes.hpp>
  6. #include <Vcl.Controls.hpp>
  7. #include <Vcl.StdCtrls.hpp>
  8. //----------------------------------------------------------------------------
  9. #include <Windows.h>
  10. //----------------------------------------------------------------------------
  11. class TCustomDialog : public TForm
  12. {
  13. __published:
  14. TButton * OKButton;
  15. TButton * CancelButton;
  16. TButton * HelpButton;
  17. void __fastcall HelpButtonClick(TObject *Sender);
  18. private:
  19. int FPos;
  20. int FIndent;
  21. int FHorizontalMargin;
  22. short FCount;
  23. void __fastcall Change(TObject * Sender);
  24. void __fastcall AddWinControl(TWinControl * Control);
  25. void __fastcall Changed();
  26. protected:
  27. DYNAMIC void __fastcall DoShow();
  28. virtual bool __fastcall CloseQuery();
  29. virtual void __fastcall DoChange(bool & CanSubmit);
  30. virtual void __fastcall DoValidate();
  31. public:
  32. __fastcall TCustomDialog(UnicodeString HelpKeyword);
  33. TLabel * __fastcall CreateLabel(UnicodeString Label);
  34. TCheckBox * __fastcall CreateAndAddCheckBox(const UnicodeString & Caption);
  35. void __fastcall AddEditLikeControl(TWinControl * Edit, TLabel * Label);
  36. void __fastcall AddEdit(TCustomEdit * Edit, TLabel * Label);
  37. void __fastcall AddComboBox(TCustomCombo * Combo, TLabel * Label);
  38. void __fastcall AddButtonControl(TButtonControl * Control);
  39. void __fastcall AddImage(const UnicodeString & ImageName);
  40. bool __fastcall Execute();
  41. };
  42. //----------------------------------------------------------------------------
  43. #endif