Module tWinStructs.pkg

     1Use Commctrl.pkg
     2// Windows structs used by the packages. We use the prefix tWin for all of these structs. Therefore we
     3// discourage developers from using this same prefix method. If you need to create you own windows structs
     4// use some other naming convention. This avoids the possibility of conflicts where the same struct was
     5// defined twice. Using a #IFDEF to check for this is not recommended because the defintions might differ.
     6
     7// Windows POINT struct
     8Struct tWinPoint
     9    DWord x
    10    DWord y
    11End_Struct
    12
    13// Windows SIZE struct
    14Struct tWinSize
    15    Integer cx
    16    Integer cy
    17End_Struct
    18
    19// Windows RECT struct
    20Struct tWinRect
    21    DWord left
    22    DWord top
    23    DWord right
    24    DWord bottom
    25End_Struct
    26
    27// Windows WINDOWPLACEMENT struct
    28Struct tWinWindowPlacement
    29    DWord length
    30    DWord flags
    31    DWord showCmd
    32    tWinPoint MinPosition
    33    tWinPoint MaxPosition
    34    tWinRect NormalPosition
    35End_Struct
    36
    37// Windows SCROLLINFO struct
    38Struct tWinScrollInfo
    39    DWord cbSize    
    40    DWord fMask     
    41    DWord nMin      
    42    DWord nMax      
    43    DWord nPage     
    44    DWord nPos      
    45    DWord nTrackPos 
    46End_Struct
    47
    48// Windows NMHDR Notification Message Header.
    49Struct tWinNmHdr
    50    Handle hWndFrom
    51    DWord  idFrom
    52    DWord  code
    53End_Struct
    54
    55
    56// Windows MONITORINFO Struct
    57Struct tWinMonitorInfo
    58    DWord cbSize
    59    tWinRect rcMonitor
    60    tWinRect rcWork
    61    DWord dwFlags
    62End_Struct
    63
    64// Treeview TVITEM struct
    65Struct tWinTvItem
    66    UInteger mask          
    67    Handle   hItem         
    68    UInteger state         
    69    UInteger stateMask     
    70    Pointer  pszText       
    71    DWord    cchTextMax    
    72    DWord    iImage        
    73    DWord    iSelectedImage
    74    DWord    cChildren     
    75    DWord    lParam        
    76End_Struct
    77
    78// Treeview TVITEMEX struct
    79Struct tWinTvItemEx
    80    UInteger mask          
    81    Handle   hItem         
    82    UInteger state         
    83    UInteger stateMask     
    84    Pointer  pszText       
    85    DWord    cchTextMax    
    86    DWord    iImage        
    87    DWord    iSelectedImage
    88    DWord    cChildren     
    89    DWord    lParam        
    90    DWord    iIntegral
    91End_Struct
    92
    93// Treeview TVINSERTSTRUCT struct
    94Struct tWinTvInsertStruct
    95    Handle hParent
    96    Handle hInsertAfter
    97    tWinTvItemEx TvItemEx
    98End_Struct
    99
   100
   101// Treeview TVHITTESTINFO struct
   102Struct tWinTvHitTestInfo
   103    tWinPoint Pt
   104    DWord  flags
   105    Handle hItem
   106End_Struct
   107
   108// Treeview NMTREEVIEW struct
   109Struct tWinNmTreeView
   110    tWinNmHdr   hdr
   111    Integer action
   112    tWinTvItem itemOld
   113    tWinTvItem itemNew
   114    tWinPoint ptDrag
   115End_Struct
   116
   117// Treeview NMTVDISPINFO struct
   118Struct tWinNmTvDispInfo
   119    tWinNmHdr   hdr
   120    tWinTvItem  item
   121End_Struct
   122
   123// Treeview NMTVKEYDOWN struct
   124Struct tWinNmTvKeyDown
   125    tWinNmHdr hdr
   126    UShort    wVKey
   127    UInteger  Flags
   128End_Struct  // tWinNmTvKeyDown
   129
   130
   131// Treeview NMTVGETINFOTIP struct
   132Struct tWinNmTvGetInfoTip
   133    tWinNmHdr hdr
   134    Pointer pszText
   135    Integer cchTextMax
   136    Handle hItem
   137    Pointer lParam
   138End_Struct
   139
   140// Treeview NMTVSTATEIMAGECHANGING struct
   141Struct tWinNmTvStateImageChanging
   142    tWinNmHdr hdr
   143    Handle hti
   144    Integer iOldStateImageIndex
   145    Integer iNewStateImageIndex
   146End_Struct
   147
   148// ToolTip TOOLINFO struct
   149Struct tWinToolInfo
   150    UInteger cbSize     
   151    UInteger uFlags     
   152    Handle hwnd         
   153    UInteger uID        
   154    tWinRect rect       
   155    Handle hInst        
   156    Pointer lpszText    
   157    Integer lParam      
   158    Integer lpReserved  
   159End_Struct
   160
   161// SysLink LITEM struct
   162Struct tWinLItem
   163    UInteger mask
   164    Integer iLink
   165    UInteger state
   166    UInteger stateMask
   167    Short[MAX_LINKID_TEXT]  szID   // WCHAR array
   168    Short[L_MAX_URL_LENGTH] szUrl  // WCHAR array
   169End_Struct
   170
   171// SysLink NMLINK struct
   172Struct tWinNmLink
   173    tWinNmHdr hdr
   174    tWinLItem item
   175End_Struct
   176
   177// Text Metric.
   178Struct tWinTextMetric
   179  Integer tmHeight
   180  Integer tmAscent
   181  Integer tmDescent
   182  Integer tmInternalLeading
   183  Integer tmExternalLeading
   184  Integer tmAveCharWidth
   185  Integer tmMaxCharWidth
   186  Integer tmWeight
   187  Integer tmOverhang
   188  Integer tmDigitizedAspectX
   189  Integer tmDigitizedAspectY
   190  Char tmFirstChar
   191  Char tmLastChar
   192  Char tmDefaultChar
   193  Char tmBreakChar
   194  UChar tmItalic
   195  UChar tmUnderlined
   196  UChar tmStruckOut
   197  UChar tmPitchAndFamily
   198  UChar tmCharSet
   199End_Struct 
   200
   201// Logical Font.
   202
   203Struct tWinLogFont
   204  Integer lfHeight
   205  Integer lfWidth
   206  Integer lfEscapement
   207  Integer lfOrientation
   208  Integer lfWeight
   209  UChar lfItalic
   210  UChar lfUnderline
   211  UChar lfStrikeOut
   212  UChar lfCharSet
   213  UChar lfOutPrecision
   214  UChar lfClipPrecision
   215  UChar lfQuality
   216  UChar lfPitchAndFamily
   217  Char[LF_FACESIZE] lfFaceName
   218End_Struct 
   219
   220// Choose Font.
   221
   222Struct tWinChooseFont
   223  DWord lStructSize
   224  Handle hwndOwner
   225  Handle hDC
   226  Pointer lpLogFont
   227  Integer iPointSize
   228  DWord Flags
   229  DWord rgbColors
   230  DWord lCustData
   231  Pointer lpfnHook
   232  Pointer lpTemplateName
   233  Handle hInstance
   234  Pointer lpszStyle
   235  Short nFontType 
   236  Short nMissingAlignment
   237  Integer nSizeMin
   238  Integer nSizeMax
   239End_Struct 
   240
   241