Custom.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. short FCount;
  21. void __fastcall Change(TObject * Sender);
  22. void __fastcall AddWinControl(TWinControl * Control);
  23. void __fastcall Changed();
  24. protected:
  25. DYNAMIC void __fastcall DoShow();
  26. virtual bool __fastcall CloseQuery();
  27. virtual void __fastcall DoChange(bool & CanSubmit);
  28. virtual void __fastcall DoValidate();
  29. public:
  30. __fastcall TCustomDialog(UnicodeString HelpKeyword);
  31. TLabel * __fastcall CreateLabel(UnicodeString Label);
  32. void __fastcall AddEditLikeControl(TWinControl * Edit, TLabel * Label);
  33. void __fastcall AddEdit(TCustomEdit * Edit, TLabel * Label);
  34. void __fastcall AddComboBox(TCustomCombo * Combo, TLabel * Label);
  35. void __fastcall AddButtonControl(TButtonControl * Control);
  36. bool __fastcall Execute();
  37. };
  38. //----------------------------------------------------------------------------
  39. #endif