⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qwindows.pas

📁 East make Tray Icon in delphi
💻 PAS
📖 第 1 页 / 共 5 页
字号:
    lParam: Integer;
    case integer of
      0:
      (
        time: Cardinal;
        pt: TPoint;
      );
      1: ( Result: Integer);
      2: ( Handled: LongBool);
  end;
  PMsg = ^TMsg;

  TMessage = packed record
    Msg: Cardinal;
    case Integer of
      0:
      (
        WParam: Longint;
        LParam: Longint;
        Result: Longint;
      );
      1:
      (
        WParamLo: Word;
        WParamHi: Word;
        LParamLo: Word;
        LParamHi: Word;
        ResultLo: Word;
        ResultHi: Word
      );
  end;
  PMessage = ^TMessage;

  { Provided to simplify VCL source sharing }
  HWND        = QWidgetH;
  HCURSOR     = QCursorH;
  HRGN        = QRegionH;
  HBRUSH      = QBrushH;
  HBITMAP     = QPixmapH;
  HDC         = QPainterH;
  HFONT       = QFontH;
  UINT        = Cardinal;
  ULONG       = Cardinal;
  DWORD       = Cardinal;
  BOOL        = LongBool;
  WPARAM      = Integer;
  LPARAM      = Integer;
  LRESULT     = Integer;
  TPointL     = TPoint;
  COLORREF    = Integer;
  TColorRef   = COLORREF;

  TWinControlActionLink = TWidgetControlActionLink;
  TControlClass = class of TControl;

  {$EXTERNALSYM TCaption}
  TCaption    = QTypes.TCaption;

  {$EXTERNALSYM TOwnerDrawState}
  TOwnerDrawState = QStdCtrls.TOwnerDrawState;

  {$EXTERNALSYM PPoint}
  {$EXTERNALSYM TPoint}
  PPoint      = Types.PPoint;
  TPoint      = Types.TPoint;

  {$EXTERNALSYM PRect}
  {$EXTERNALSYM TRect}
  PRect       = Types.PRect;
  TRect       = Types.TRect;

  {$EXTERNALSYM PSize}
  {$EXTERNALSYM TSize}
  TSize       = Types.TSize;
  PSize       = Types.PSize;

  PSmallPoint = Types.PSmallPoint;
  TSmallPoint = Types.TSmallPoint;
  {$EXTERNALSYM PSmallPoint}
  {$EXTERNALSYM TSmallPoint}

  TTime       = type TDateTime;
  TDate       = type TDateTime;
  {$EXTERNALSYM TDate}
  {$EXTERNALSYM TTime}

  { colors }
  TRGBQuad = packed record
    rgbBlue: Byte;
    rgbGreen: Byte;
    rgbRed: Byte;
    rgbReserved: Byte;
  end;
  TRGBTriple  = TRGBQuad; // Qt does not support 24 bit pixmaps

  { fonts }
  tagTEXTMETRICA = record
    tmHeight: Longint;
    tmAscent: Longint;
    tmDescent: Longint;
    //tmInternalLeading: Longint; // not supported
    tmExternalLeading: Longint;
    tmAveCharWidth: Longint;
    tmMaxCharWidth: Longint;
    tmWeight: Longint;
    //tmOverhang: Longint; // not supported
    tmDigitizedAspectX: Longint;
    tmDigitizedAspectY: Longint;
    tmFirstChar: AnsiChar;
    tmLastChar: AnsiChar;
    tmDefaultChar: AnsiChar;
    tmBreakChar: AnsiChar;
    tmItalic: Byte;
    tmUnderlined: Byte;
    tmStruckOut: Byte;
    tmPitchAndFamily: Byte;
    tmCharSet: Byte;
  end;
  TTextMetric = tagTEXTMETRICA;
  TEXTMETRIC  = TTextMetric;

  { Logical Pen }
  PLogPen = ^TLogPen;
  tagLOGPEN = packed record
    lopnStyle: UINT;
    lopnWidth: TPoint;
    lopnColor: COLORREF;
  end;
  TLogPen     = tagLOGPEN;
  LOGPEN      = tagLOGPEN;

  { Logical Palette }
  PPaletteEntry = ^TPaletteEntry;
  tagPALETTEENTRY = packed record
    peRed: Byte;
    peGreen: Byte;
    peBlue: Byte;
    peFlags: Byte;
  end;
  TPaletteEntry = tagPALETTEENTRY;
  PALETTEENTRY = tagPALETTEENTRY;

  PLogPalette = ^TLogPalette;
  tagLOGPALETTE = packed record
    palVersion: Word;
    palNumEntries: Word;
    palPalEntry: array[0..0] of TPaletteEntry;
  end;
  TLogPalette = tagLOGPALETTE;
  LOGPALETTE  = tagLOGPALETTE;

  PMaxLogPalette = ^TMaxLogPalette;
  TMaxLogPalette = packed record
    palVersion: Word;
    palNumEntries: Word;
    palPalEntry: array[Byte] of TPaletteEntry;
  end;

  PtagBITMAP  = ^tagBITMAP;
  tagBITMAP = packed record
    //bmType: Longint;
    bmWidth: Longint;
    bmHeight: Longint;
    //bmWidthBytes: Longint;
    //bmPlanes: Word;
    bmBitsPixel: Word;
    //bmBits: Pointer;
  end;

  PBitmapInfoHeader = ^TBitmapInfoHeader;
  tagBITMAPINFOHEADER = packed record
    biSize: DWORD;
    biWidth: Longint;
    biHeight: Longint;
    biPlanes: Word;
    biBitCount: Word;
    biCompression: DWORD;
    biSizeImage: DWORD;
    biXPelsPerMeter: Longint;
    biYPelsPerMeter: Longint;
    biClrUsed: DWORD;
    biClrImportant: DWORD;
  end;
  TBitmapInfoHeader = tagBITMAPINFOHEADER;
  BITMAPINFOHEADER  = tagBITMAPINFOHEADER;

  PBitmapInfo = ^TBitmapInfo;
  tagBITMAPINFO = packed record
    bmiHeader: TBitmapInfoHeader;
    bmiColors: array[0..0] of TRGBQuad;
  end;
  TBitmapInfo = tagBITMAPINFO;
  BITMAPINFO = tagBITMAPINFO;

  PBitmapFileHeader = ^TBitmapFileHeader;
  tagBITMAPFILEHEADER = packed record
    bfType: Word;
    bfSize: DWORD;
    bfReserved1: Word;
    bfReserved2: Word;
    bfOffBits: DWORD;
  end;
  TBitmapFileHeader = tagBITMAPFILEHEADER;
  BITMAPFILEHEADER  = tagBITMAPFILEHEADER;

  tagDRAWITEMSTRUCT = packed record
    CtlType: Cardinal;
    CtlID: Cardinal;
    itemID: Cardinal;
    itemAction: Cardinal;
    itemState: Cardinal;
    hwndItem: QWidgetH;
    hDC: QPainterH;
    rcItem: TRect;
    itemData: Cardinal;
  end;
  TDrawItemStruct   = tagDRAWITEMSTRUCT;
  DRAWITEMSTRUCT    = tagDRAWITEMSTRUCT;

type
  TDeviceCap = (
    HORZSIZE,        {Horizontal size in millimeters}
    VERTSIZE,        {Vertical size in millimeters}
    HORZRES,         {Horizontal width in pixels}
    VERTRES,         {Vertical height in pixels}
    BITSPIXEL,       {Number of bits per pixel}
    PLANES,          {Number of planes}
    NUMCOLORS,
    LOGPIXELSX,      {Logical pixelsinch in X}
    LOGPIXELSY,      {Logical pixelsinch in Y}
    PHYSICALWIDTH,   {Physical Width in device units}
    PHYSICALHEIGHT,  {Physical Height in device units}
    PHYSICALOFFSETX, {Physical Printable Area X margin}
    PHYSICALOFFSETY  {Physical Printable Area Y margin}
  );

  { Mapping Modes }
  TMapMode = (
    MM_TEXT        = 1,
    MM_LOMETRIC    = 2,
    MM_HIMETRIC    = 3,
    MM_LOENGLISH   = 4,
    MM_HIENGLISH   = 5,
    MM_TWIPS       = 6,
    MM_ISOTROPIC   = 7,
    MM_ANISOTROPIC = 8
  );

const
  { Min and Max Mapping Mode values }
  MM_MIN = MM_TEXT;
  MM_MAX = MM_ANISOTROPIC;
  MM_MAX_FIXEDSCALE = MM_TWIPS;

type
  TMinMaxInfo = packed record
    ptReserved: TPoint;
    ptMaxSize: TPoint;
    ptMaxPosition: TPoint;
    ptMinTrackSize: TPoint;
    ptMaxTrackSize: TPoint;
  end;

(*)
  PPaintStruct = ^TPaintStruct;
  tagPAINTSTRUCT = packed record
    hdc: HDC;
    fErase: BOOL;
    rcPaint: TRect;
    fRestore: BOOL;
    fIncUpdate: BOOL;
    rgbReserved: array[0..31] of Byte;
  end;
  TPaintStruct = tagPAINTSTRUCT;
  PAINTSTRUCT = tagPAINTSTRUCT;
(*)

{ regions }
type
  TCombineMode = (
    RGN_AND,   // Creates the intersection of the two combined regions.
    RGN_COPY,  // Creates a copy of the region identified by hrgnSrc1.
    RGN_DIFF,  // Combines the parts of hrgnSrc1 that are not part of hrgnSrc2.
    RGN_OR,    // Creates the union of two combined regions.
    RGN_XOR    // Creates the union of two combined regions except for any overlapping areas.
  );

  PSecurityAttributes = Pointer;

{ StretchBlt() Modes }
  TStretchMode = (
    BLACKONWHITE = 1,
    WHITEONBLACK = 2,
    COLORONCOLOR = 3,
    HALFTONE     = 4
  );

const
  MAXSTRETCHBLTMODE   = 4;
  STRETCH_ANDSCANS    = BLACKONWHITE;
  STRETCH_ORSCANS     = WHITEONBLACK;
  STRETCH_DELETESCANS = COLORONCOLOR;
  STRETCH_HALFTONE    = HALFTONE;

{ Stock Logical Objects }
type
  TStockObjectBrush = (
    WHITE_BRUSH  = 0,
    LTGRAY_BRUSH = 1,
    GRAY_BRUSH   = 2,
    DKGRAY_BRUSH = 3,
    BLACK_BRUSH  = 4,
    NULL_BRUSH   = 5,
    DC_BRUSH     = 18
  );

  TStockObjectPen = (
    WHITE_PEN = 6,
    BLACK_PEN = 7,
    NULL_PEN  = 8,
    DC_PEN    = 19
  );

  TStockObjectFont = (
    OEM_FIXED_FONT      = 10,
    ANSI_FIXED_FONT     = 11,
    ANSI_VAR_FONT       = 12,
    SYSTEM_FONT         = 13,
    DEVICE_DEFAULT_FONT = 14,
    DEFAULT_PALETTE     = 15,
    SYSTEM_FIXED_FONT   = $10,
    DEFAULT_GUI_FONT    = 17
  );

const
  HOLLOW_BRUSH = NULL_BRUSH;
  STOCK_LAST   = DC_PEN;

type
  TSysMetrics = (
    SM_CXSCREEN,  SM_CYSCREEN,
    SM_CXVSCROLL, SM_CYVSCROLL,
    SM_CXHSCROLL, SM_CYHSCROLL,
    SM_CXSMICON,  SM_CYSMICON,
    SM_CXICON,    SM_CYICON,
    SM_CXBORDER,  SM_CYBORDER,
    SM_CXFRAME,   SM_CYFRAME,
    SM_CYCAPTION, SM_CXDLGFRAME,
    SM_CYDLGFRAME
  );

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -