Files
AccompanyCube/MessageFormUnit.h
2026-06-13 00:10:11 +08:00

61 lines
1.8 KiB
C++

//---------------------------------------------------------------------------
#ifndef MessageFormUnitH
#define MessageFormUnitH
//---------------------------------------------------------------------------
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.ExtCtrls.hpp>
#include <Vcl.Imaging.pngimage.hpp>
#include "PNGButton.hpp"
#include <Vcl.Imaging.jpeg.hpp>
#include <Vcl.Graphics.hpp>
//---------------------------------------------------------------------------
#define MB_CHECKED 0x100
#define MB_UNCHECKED 0x200
class TMessageForm : public TForm
{
__published: // IDE-managed Components
TImage *m_imgBk;
TImage *m_iconError;
TImage *m_iconInformation;
TImage *m_iconQuestion;
TPNGButton *m_btnYes;
TPNGButton *m_btnOk;
TPNGButton *m_btnNo;
TPNGButton *m_btnCancel;
TLabel *m_lblMessage;
TPaintBox *m_pbCheck;
TLabel *m_lblCheckMessage;
void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
void __fastcall CheckPaint(TObject *Sender);
void __fastcall CheckClick(TObject *Sender);
void __fastcall CheckMessageClick(TObject *Sender);
private: // User declarations
TBitmap * m_pImgCheck;
int m_iCheck;
void __fastcall WMNCHitTest(TWMNCHitTest &Msg);
BEGIN_MESSAGE_MAP
MESSAGE_HANDLER(WM_NCHITTEST, TWMNCHitTest, WMNCHitTest)
END_MESSAGE_MAP(TForm)
public: // User declarations
__fastcall TMessageForm(TComponent* Owner);
__fastcall ~TMessageForm();
void _fastcall SetCheckMessage( String strMessage );
bool GetCheckState();
int __fastcall ShowMessage( const String AMessage, int AType=MB_ICONINFORMATION|MB_OK );
};
//---------------------------------------------------------------------------
extern PACKAGE TMessageForm *MessageForm;
//---------------------------------------------------------------------------
#endif