fork download
  1. //---------------------------------------------------------------------------
  2.  
  3. #include <vcl.h>
  4.  
  5. #pragma hdrstop
  6.  
  7. #include "TestButton.h"
  8. #pragma package(smart_init)
  9. //---------------------------------------------------------------------------
  10. // ValidCtrCheck is used to assure that the components created do not have
  11. // any pure virtual functions.
  12. //
  13.  
  14. static inline void ValidCtrCheck(TTestButton *)
  15. {
  16. new TTestButton(NULL);
  17. }
  18. //---------------------------------------------------------------------------
  19. __fastcall TTestButton::TTestButton(TComponent* Owner)
  20. : TButton(Owner)
  21. {
  22. Image = new TImage(this);
  23. Image->Parent = this;
  24. Image->Center = true;
  25. Image->Top = 0;
  26. Image->Left = 0;
  27. Image->Picture->LoadFromFile("C:\\TestButton\\123.jpg");
  28. }
  29. //---------------------------------------------------------------------------
  30. void __fastcall TTestButton::SetFSize(ButtonSize Value){
  31. switch(Value){
  32. case _10X20:
  33. Width = 10;
  34. Height = 20;
  35. break;
  36. case _30X40:
  37. Width = 30;
  38. Height = 40;
  39. break;
  40. case _50X60:
  41. Width = 50;
  42. Height = 60;
  43. break;
  44.  
  45. }
  46. FSize = Value;
  47. }
  48. //---------------------------------------------------------------------------
  49. namespace Testbutton
  50. {
  51. void __fastcall PACKAGE Register()
  52. {
  53. TComponentClass classes[1] = {__classid(TTestButton)};
  54. RegisterComponents("Test", classes, 0);
  55. }
  56. }
  57. //---------------------------------------------------------------------------
  58.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3:17: fatal error: vcl.h: No such file or directory
 #include <vcl.h>
                 ^
compilation terminated.
stdout
Standard output is empty