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

41 lines
1.1 KiB
C++

//---------------------------------------------------------------------------
#ifndef TransparentEditUnitH
#define TransparentEditUnitH
#define UM_TEINVALIDATE WM_USER + 0x1003
namespace TransparentEditUnit
{
//---------------------------------------------------------------------------
class TEdit : public Stdctrls::TEdit
{
private:
bool FTransparent;
MESSAGE void __fastcall WMEraseBkgnd(TWMEraseBkgnd &Message);
MESSAGE void __fastcall CNCtlColorEdit(TWMCtlColorEdit &Message);
MESSAGE void __fastcall TEInvalidate(TMessage &Message);
BEGIN_MESSAGE_MAP
MESSAGE_HANDLER(WM_ERASEBKGND, TWMEraseBkgnd, WMEraseBkgnd)
MESSAGE_HANDLER(CN_CTLCOLOREDIT, TWMCtlColorEdit, CNCtlColorEdit)
MESSAGE_HANDLER(UM_TEINVALIDATE, TMessage, TEInvalidate)
END_MESSAGE_MAP(Vcl::Stdctrls::TEdit)
protected:
virtual void __fastcall CreateWnd();
virtual void __fastcall CreateParams(Vcl::Controls::TCreateParams &Params);
public:
__fastcall virtual TEdit(System::Classes::TComponent* AOwner);
virtual void __fastcall Invalidate();
};
}
using namespace TransparentEditUnit;
#endif