home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Examples / Apps / TrayIcon / TRAYMAIN.H < prev   
Encoding:
C/C++ Source or Header  |  1999-01-26  |  2.4 KB  |  66 lines

  1. //----------------------------------------------------------------------------
  2. //Borland C++Builder
  3. //Copyright (c) 1987, 1998 Borland International Inc. All Rights Reserved.
  4. //----------------------------------------------------------------------------
  5. //---------------------------------------------------------------------------
  6. #ifndef traymainH
  7. #define traymainH
  8. //---------------------------------------------------------------------------
  9. #include <Forms.hpp>
  10. #include <StdCtrls.hpp>
  11. #include <Controls.hpp>
  12. #include <Classes.hpp>
  13. #include <ExtCtrls.hpp>
  14. #include <Menus.hpp>
  15. #include <Graphics.hpp>
  16. #define MYWM_NOTIFY         (WM_APP+100)
  17. #define IDC_MYICON                     1006
  18. extern HINSTANCE g_hinst;
  19. LRESULT IconDrawItem(LPDRAWITEMSTRUCT lpdi);
  20. //---------------------------------------------------------------------------
  21. class TForm1 : public TForm
  22. {
  23. __published:
  24.     TButton *Button1;
  25.     TCheckBox *CheckBox1;
  26.     TRadioButton *RadioButton1;
  27.     TRadioButton *RadioButton2;
  28.     TEdit *Edit1;
  29.     TEdit *Edit2;
  30.     TImage *Image2;
  31.     TImage *Image1;
  32.     TLabel *Label1;
  33.     TLabel *Label2;
  34.     TPopupMenu *PopupMenu1;
  35.     TMenuItem *Properties1;
  36.     TMenuItem *ToggleState1;
  37.     TMenuItem *Shutdown1;
  38.     void __fastcall FormDestroy(TObject *Sender);
  39.     void __fastcall CheckBox1Click(TObject *Sender);
  40.     void __fastcall Button1Click(TObject *Sender);
  41.     void __fastcall RadioButtonClick(TObject *Sender);
  42.     void __fastcall EditKeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
  43.     void __fastcall Properties1Click(TObject *Sender);
  44.     void __fastcall ToggleState1Click(TObject *Sender);
  45.     void __fastcall Shutdown1Click(TObject *Sender);
  46.     
  47.     
  48. private:        // private user declarations
  49.     void __fastcall DrawItem(TMessage& Msg);
  50.     void __fastcall MyNotify(TMessage& Msg);
  51.     bool __fastcall TrayMessage(DWORD dwMessage);
  52.     HICON __fastcall IconHandle(void);
  53.     void __fastcall ToggleState(void);
  54.     PSTR __fastcall TipText(void);
  55. public:         // public user declarations
  56.     virtual __fastcall TForm1(TComponent* Owner);
  57. BEGIN_MESSAGE_MAP
  58. MESSAGE_HANDLER(WM_DRAWITEM,TMessage,DrawItem)
  59. MESSAGE_HANDLER(MYWM_NOTIFY,TMessage,MyNotify)
  60. END_MESSAGE_MAP(TForm)
  61. };
  62. //---------------------------------------------------------------------------
  63. extern TForm1 *Form1;
  64. //---------------------------------------------------------------------------
  65. #endif
  66.