📄 winskinform.hpp
字号:
#pragma pack(pop)
#pragma pack(push,1)
Types::TRect oldsize;
#pragma pack(pop)
int MenuHeight;
int BtnCount;
bool fInMenu;
bool Creating;
bool bidileft;
bool fSizeable;
bool fMaxable;
bool fminable;
bool isunicode;
bool ismessagebox;
bool ischildform;
AnsiString backstr;
Menus::TPopupMenu* sysmenu;
unsigned ClientHwnd;
unsigned NewChildHwnd;
HMENU hmenu;
HMENU hsysmenu;
HMENU tempmenu;
HMENU activemenu;
Graphics::TColor formcolor;
unsigned dwstyle;
int RightBtn;
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
void __fastcall DrawSysbtn(TWinSysButton* btn, int i);
void __fastcall ResizeForm(int i);
bool __fastcall FindSkinComp(Controls::TControl* acomp);
bool __fastcall FindSkinComp2(Controls::TWinControl* ctrl);
void __fastcall InitControlA(Controls::TWinControl* wForm);
void __fastcall InitChildCtrl(Controls::TWinControl* wForm);
bool __fastcall Find3rdControl(AnsiString aname, Controls::TWinControl* comp);
public:
TNCObject* ActiveBtn;
bool crop;
unsigned WinRgn;
Forms::TForm* FForm;
unsigned Hwnd;
Graphics::TCanvas* fCanvas;
Graphics::TCanvas* fcanvas2;
Winskindata::TSkinData* fsd;
TWinSkinMenu* menu;
DynamicArray<TWinSysButton* > SysBtn;
Graphics::TBitmap* IconBmp;
Graphics::TBitmap* CaptionBuf;
Classes::TList* Controllist;
int fwidth;
int fheight;
int crwidth;
int crheight;
bool FWindowActive;
TSkinFormStyle FormStyle;
TSkinFormBorder FormBorder;
TSkinFormIcons FormIcons;
TSkinWindowState Windowstate;
int Skinstate;
Winsubclass::TSkinControl* Activeskincontrol;
int mode;
AnsiString formclass;
__fastcall virtual TWinSkinForm(Classes::TComponent* AOwner);
__fastcall virtual ~TWinSkinForm(void);
void __fastcall Refresh(void);
void __fastcall Minimize(void);
void __fastcall Maximize(void);
void __fastcall Restore(void);
void __fastcall RestoreMDI(void);
void __fastcall UnSubclass(void);
void __fastcall UnSubclass2(void);
void __fastcall UnSubclass3(void);
bool __fastcall CheckMenu(TMenuBtn* Button);
bool __fastcall MDIChildMax(void);
void __fastcall ClickButton(TMenuBtn* Button);
void __fastcall getClipMap(Graphics::TBitmap* fbmp);
void __fastcall doLog(AnsiString msg);
void __fastcall InitPopMenu(Controls::TWinControl* wForm, bool Enable, bool Update);
void __fastcall InitMainMenu(Controls::TWinControl* wForm, bool Enable, bool Update);
__property bool Active = {read=FActive, write=SetActive, nodefault};
void __fastcall SkinChange(void);
void __fastcall AddSysMenuitem(AnsiString acaption, int action);
void __fastcall EnableSysbtn(bool b);
void __fastcall Uncropwindow(void);
void __fastcall Cropwindow(void);
void __fastcall InitTform(Winskindata::TSkinData* afsd, Forms::TForm* aform);
void __fastcall InitControls(Controls::TWinControl* wForm);
void __fastcall AddComp(Controls::TControl* Comp, Controls::TWinControl* wForm);
void __fastcall InitNestform(Controls::TWinControl* wForm);
void __fastcall RePaint(unsigned ahwnd);
void __fastcall InitSkinData(void);
void __fastcall UpdateMainMenu(void);
void __fastcall DeleteSysbtn(void);
bool __fastcall AddControlList(Winsubclass::TSkinControl* acontrol);
void __fastcall AddControlh(HWND ahwnd);
void __fastcall InitHwndControls(unsigned ahwnd);
void __fastcall DeleteControl(Winsubclass::TSkinControl* c);
void __fastcall DrawMenuItem(System::TObject* Sender, Graphics::TCanvas* ACanvas, const Types::TRect &ARect, bool Selected);
void __fastcall MeasureItem(System::TObject* Sender, Graphics::TCanvas* ACanvas, int &Width, int &Height);
void __fastcall InitDlg(Winskindata::TSkinData* afsd);
};
class PASCALIMPLEMENTATION TNCObject : public System::TObject
{
typedef System::TObject inherited;
public:
TWinSkinForm* SF;
Winskindata::TSkinData* fsd;
#pragma pack(push,1)
Types::TRect bounds;
#pragma pack(pop)
bool visible;
int state;
bool enabled;
virtual void __fastcall MouseDown(void);
virtual void __fastcall MouseUp(void);
virtual void __fastcall MouseEnter(void);
virtual void __fastcall MouseLeave(void);
virtual void __fastcall Draw(void);
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TNCObject(void) : System::TObject() { }
#pragma option pop
#pragma option push -w-inl
/* TObject.Destroy */ inline __fastcall virtual ~TNCObject(void) { }
#pragma option pop
};
class PASCALIMPLEMENTATION TMenuBtn : public TNCObject
{
typedef TNCObject inherited;
public:
Menus::TMenuItem* menuitem;
Winskindata::TSkinData* FSD;
int index;
WideString caption;
bool enabled;
HMENU hsubmenu;
int mid;
virtual void __fastcall Draw(void);
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TMenuBtn(void) : TNCObject() { }
#pragma option pop
#pragma option push -w-inl
/* TObject.Destroy */ inline __fastcall virtual ~TMenuBtn(void) { }
#pragma option pop
};
class PASCALIMPLEMENTATION TWinSysButton : public TNCObject
{
typedef TNCObject inherited;
public:
Winskindata::TDataSkinSysButton* data;
virtual void __fastcall Draw(void);
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TWinSysButton(void) : TNCObject() { }
#pragma option pop
#pragma option push -w-inl
/* TObject.Destroy */ inline __fastcall virtual ~TWinSysButton(void) { }
#pragma option pop
};
typedef DynamicArray<TMenuBtn* > WinSkinForm__5;
typedef DynamicArray<TWinSysButton* > WinSkinForm__7;
class DELPHICLASS TWinSkinSpy;
class PASCALIMPLEMENTATION TWinSkinSpy : public Classes::TComponent
{
typedef Classes::TComponent inherited;
protected:
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
public:
TWinSkinForm* sf;
__fastcall virtual ~TWinSkinSpy(void);
public:
#pragma option push -w-inl
/* TComponent.Create */ inline __fastcall virtual TWinSkinSpy(Classes::TComponent* AOwner) : Classes::TComponent(AOwner) { }
#pragma option pop
};
//-- var, const, procedure ---------------------------------------------------
static const Word CN_FormUPdate = 0x3502;
static const Word CN_NewForm = 0x3503;
static const Word CN_IsSkined = 0x3523;
static const Word CN_NewMDIChild = 0x3516;
static const Word CN_ReCreateWnd = 0x3517;
static const Word CN_MenuSelect = 0x3518;
static const Word cKey1 = 0x6d41;
static const int cKey2 = 0x5cda3;
static const Shortint MAX_CLASSNAME = 0x64;
static const Shortint MAX_MENUITEM_TEXT = 0x40;
static const Word Max_MenuitemID = 0x1000;
extern PACKAGE char c_demo[13];
extern PACKAGE unsigned WinVersion;
extern PACKAGE Graphics::TBitmap* BG;
extern PACKAGE Classes::TStringList* Logstring;
extern PACKAGE bool SkinCanLog;
extern PACKAGE HMENU __fastcall CopyHMenu(HMENU amenu);
extern PACKAGE void __fastcall DeleteHMenu(HMENU amenu);
extern PACKAGE WideString __fastcall GetFormCaption(unsigned ahwnd);
extern PACKAGE AnsiString __fastcall GetFormCaptionA(unsigned ahwnd);
extern PACKAGE AnsiString __fastcall GetFormText(unsigned ahwnd);
extern PACKAGE bool __stdcall EnumControl(HWND ahwnd, int lParam);
extern PACKAGE AnsiString __fastcall GetWindowClassname(unsigned ahwnd);
extern PACKAGE AnsiString __fastcall MsgtoStr(const Messages::TMessage &aMsg);
extern PACKAGE void __fastcall DrawBGbmp(Graphics::TCanvas* acanvas, const Types::TRect &Dst, Graphics::TBitmap* Bitmap, const Types::TRect &SrcRect);
extern PACKAGE HRGN __fastcall BitmapToRegion(Graphics::TBitmap* bmp, int xx, int yy, Graphics::TColor TransparentColor = (Graphics::TColor)(0xff00ff), Byte RedTol = (Byte)(0x1), Byte GreenTol = (Byte)(0x1), Byte BlueTol = (Byte)(0x1));
extern PACKAGE void __fastcall DrawRect2(HDC DC, const Types::TRect &Dst, Graphics::TBitmap* Bmp, const Types::TRect &Src, int I, int N, int Trans = 0x0, int Tile = 0x0, int Spliter = 0x0);
extern PACKAGE void __fastcall DrawRectTile(Graphics::TCanvas* acanvas, const Types::TRect &Dst, Graphics::TBitmap* Bmp, const Types::TRect &Src, int I, int N, int Trans = 0x0, int Spliter = 0x1);
extern PACKAGE Graphics::TBitmap* __fastcall GetHMap(const Types::TRect &Dst, Graphics::TBitmap* Bmp, const Types::TRect &Src, int I, int N, int Tile = 0x0, int Spliter = 0x0);
extern PACKAGE void __fastcall DrawBorder(HDC Dc, const Types::TRect &Dst, Graphics::TBitmap* Bmp, const Types::TRect &Src, int I, int N, int Tile = 0x0, int Spliter = 0x0);
extern PACKAGE Graphics::TBitmap* __fastcall GetThumbMap(const Types::TRect &Dst, Graphics::TBitmap* Bmp, const Types::TRect &Src, int I, int N, int Tile = 0x0, int Spliter = 0x0);
extern PACKAGE int __fastcall Max(const int A, const int B);
extern PACKAGE int __fastcall Min(const int A, const int B);
extern PACKAGE void __fastcall Bitmapdraw(HDC DC, const Types::TRect &Dst, Graphics::TBitmap* Bmp);
extern PACKAGE void __fastcall DrawRect1(HDC DC, const Types::TRect &Dst, Graphics::TBitmap* Bmp, int I, int N, int Trans = 0x0);
extern PACKAGE void __fastcall DrawRect3(HDC DC, const Types::TRect &Dst, Graphics::TBitmap* Bmp, int I, int N, int Trans = 0x0);
extern PACKAGE void __fastcall DrawRectH(HDC DC, const Types::TRect &Dst, Graphics::TBitmap* Bmp, const Types::TRect &Src, int I, int N, int Tile = 0x0, int Spliter = 0x0);
extern PACKAGE void __fastcall DrawRectV(HDC DC, const Types::TRect &Dst, Graphics::TBitmap* Bmp, const Types::TRect &Src, int I, int N, int Tile = 0x0, int Spliter = 0x0);
extern PACKAGE void __fastcall DrawParentImage(Controls::TControl* Control, HDC DC, bool InvalidateParent = false);
extern PACKAGE void __fastcall DrawTranmap(HDC DC, const Types::TRect &Dst, Graphics::TBitmap* temp, Graphics::TColor transcolor = (Graphics::TColor)(0xff00ff));
extern PACKAGE void __fastcall SkinAddLog(AnsiString msg);
} /* namespace Winskinform */
using namespace Winskinform;
#pragma pack(pop)
#pragma option pop
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // Winskinform
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -