EnglishРусский  

   ..

   addustr.g

   app.g

   btn.g

   btnpic.g

   comp.g

   ctrl.g

   ctrlci.g

   dialogs.g

   dlgbtns.g

   edit.g

   events.g

   fonts.g

   form.g

   gray.g

   grey.g

   header.g

   images.g

   label.g

   labeled.g

   locustr.g

   menu.g

   panel.g

   picture.g

   styles.g

   tab.g

   tabitem.g

   tabpage.g

   timer.g

   toolbar.g

   tray.g

   url.g

   vis.g

   viswin.g

Данный проект закрыт! Создан новый скриптовый язык с тем же именем. Всё доступно на GitHub.
Также попробуйте нашу open source кроссплатформенную программу для создания и управления скриптами.

Реклама

Инсталлятор CreateInstall
Бесплатные и коммерческие инсталляторы

source\lib\vis\viswin.g
   1 
   2 type WNDCLASSEX { 
   3    uint    cbSize 
   4    uint    style 
   5    uint    lpfnWndProc 
   6    int     cbClsExtra 
   7    int     cbWndExtra 
   8    uint    hInstance 
   9    uint    hIcon 
  10    uint    hCursor 
  11    uint    hbrBackground 
  12    uint    lpszMenuName 
  13    uint    lpszClassName 
  14    uint    hIconSm 
  15 } 
  16 
  17 type POINT {
  18    int  x 
  19    int  y
  20 }
  21 
  22 type MSG {    
  23    uint  hwnd     
  24    uint  msg//message 
  25    uint  wpar//wParam 
  26    uint  lpar//lParam 
  27 //   uint  time 
  28 //   POINT pt 
  29 } 
  30 
  31 type RECT { 
  32   int  left
  33   int  top
  34   int  right
  35   int  bottom
  36 }
  37 
  38 type WINDOWPOS {   
  39     uint hwnd                     
  40     uint hwndInsertAfter          
  41     int  x                        
  42     int  y                        
  43     int  cx                       
  44     int  cy                       
  45     uint flags                    
  46 } 
  47 
  48 
  49 type PAINTSTRUCT {
  50    uint        hdc
  51    uint        fErase
  52    RECT        rcPaint
  53    uint        fRestore
  54    uint        fIncUpdate
  55    reserved    rgbReserved[32]
  56 }
  57 
  58 type DRAWITEMSTRUCT {
  59     uint        CtlType
  60     uint        CtlID
  61     uint        itemID
  62     uint        itemAction
  63     uint        itemState
  64     uint        hwndItem
  65     uint        hDC
  66     RECT        rcItem
  67     uint        itemData
  68 } 
  69 
  70 type MEASUREITEMSTRUCT {
  71     uint CtlType
  72     uint CtlID
  73     uint itemID
  74     uint itemWidth
  75     uint itemHeight
  76     uint itemData
  77 } 
  78 
  79 type NMHDR 
  80 { 
  81    uint   hwndFrom
  82    uint   idFrom 
  83    uint   code 
  84 }
  85 
  86 type SCROLLINFO { 
  87     uint cbSize 
  88     uint fMask 
  89     int  nMin 
  90     int  nMax 
  91     uint nPage 
  92     int  nPos 
  93     int  nTrackPos 
  94 } 
  95 
  96 type MENUITEMINFO {
  97     uint    cbSize 
  98     uint    fMask 
  99     uint    fType 
 100     uint    fState 
 101     uint    wID 
 102     uint    hSubMenu 
 103     uint    hbmpChecked 
 104     uint    hbmpUnchecked 
 105     uint    dwItemData 
 106     uint    dwTypeData 
 107     uint    cch 
 108     uint    hbmpItem
 109 }
 110 
 111 type TCITEM {
 112    uint mask
 113    uint dwState
 114    uint dwStateMask
 115    uint pszText
 116    int  cchTextMax
 117    int  iImage
 118    uint lParam
 119 } 
 120 
 121 type ACCEL {
 122    byte   fVirt 
 123    ushort key 
 124    ushort cmd
 125 }
 126 //ACCEL.fVirt
 127 define {
 128 FVIRTKEY  = 0x01
 129 FNOINVERT = 0x02
 130 FSHIFT    = 0x04
 131 FCONTROL  = 0x08
 132 FALT      = 0x10
 133 }
 134 
 135 type STYLESTRUCT {  
 136     uint styleOld 
 137     uint styleNew 
 138 }
 139 
 140 type TEXTMETRIC
 141 {
 142     uint        tmHeight
 143     uint        tmAscent
 144     uint        tmDescent
 145     uint        tmInternalLeading
 146     uint        tmExternalLeading
 147     uint        tmAveCharWidth
 148     uint        tmMaxCharWidth
 149     uint        tmWeight
 150     uint        tmOverhang
 151     uint        tmDigitizedAspectX
 152     uint        tmDigitizedAspectY
 153     ushort      tmFirstChar
 154     ushort      tmLastChar
 155     ushort      tmDefaultChar
 156     ushort      tmBreakChar
 157     ubyte       tmItalic
 158     ubyte       tmUnderlined
 159     ubyte       tmStruckOut
 160     ubyte       tmPitchAndFamily
 161     ubyte       tmCharSet
 162 }
 163 
 164 
 165 type LOGFONT {  
 166    int lfHeight 
 167    int lfWidth 
 168    int lfEscapement 
 169    int lfOrientation 
 170    int lfWeight 
 171    byte lfItalic 
 172    byte lfUnderline 
 173    byte lfStrikeOut 
 174    byte lfCharSet 
 175    byte lfOutPrecision 
 176    byte lfClipPrecision 
 177    byte lfQuality 
 178    byte lfPitchAndFamily 
 179    reserved lfFaceName[64] 
 180 }
 181 
 182 type LOGBRUSH {
 183    uint lbStyle 
 184    uint lbColor 
 185    uint lbHatch
 186 }
 187 
 188 type SIZE {  
 189     int cx 
 190     int cy 
 191 }  
 192 
 193 type WINDOWPLACEMENT {     
 194     uint  length
 195     uint  flags
 196     uint  showCmd
 197     POINT ptMinPosition
 198     POINT ptMaxPosition
 199     RECT  rcNormalPosition
 200 } 
 201 
 202 type ICONINFO {  
 203    uint   fIcon 
 204    uint   xHotspot 
 205    uint   yHotspot 
 206    uint   hbmMask 
 207    uint   hbmColor 
 208 }
 209 
 210 type BITMAP
 211 {
 212     uint        bmType
 213     uint        bmWidth
 214     uint        bmHeight
 215     uint        bmWidthBytes
 216     ushort      bmPlanes
 217     ushort      bmBitsPixel
 218     uint        bmBits
 219 }
 220 
 221 
 222 type TRACKMOUSEEVENT {
 223     uint cbSize
 224     uint dwFlags
 225     uint hwndTrack
 226     uint dwHoverTime
 227 } 
 228 
 229 define {
 230 SRCCOPY             =0x00CC0020
 231 SRCPAINT            =0x00EE0086
 232 SRCAND              =0x008800C6
 233 SRCINVERT           =0x00660046
 234 SRCERASE            =0x00440328
 235 NOTSRCCOPY          =0x00330008
 236 NOTSRCERASE         =0x001100A6
 237 MERGECOPY           =0x00C000CA
 238 MERGEPAINT          =0x00BB0226
 239 PATCOPY             =0x00F00021
 240 PATPAINT            =0x00FB0A09
 241 PATINVERT           =0x005A0049
 242 DSTINVERT           =0x00550009
 243 BLACKNESS           =0x00000042
 244 WHITENESS           =0x00FF0062
 245 
 246 
 247 
 248 }
 249 
 250 import "gdi32"
 251 {
 252    uint CreateBitmap( int, int, uint, uint, uint )
 253    uint CreateBrushIndirect( LOGBRUSH )
 254    uint CreateCompatibleBitmap( uint, uint, uint )
 255    uint CreateCompatibleDC( uint )
 256    uint CreateFontIndirectW( LOGFONT ) -> CreateFontIndirect
 257    uint CreatePatternBrush( uint )
 258    uint CreatePen( uint, uint, uint )
 259    uint CreateSolidBrush( uint )
 260    uint DeleteDC( uint )
 261    uint DeleteObject( uint )
 262    uint ExtTextOutW( uint, int, int, uint, RECT, uint, uint, uint ) -> ExtTextOut
 263    uint FillRgn( uint, uint, uint )
 264    //uint GetBitmapDimensionEx( uint, SIZE )
 265    int  GetClipRgn( uint, uint )   
 266    uint GetBrushOrgEx( uint, POINT )
 267    uint GetCurrentObject( uint, uint )
 268    int  GetDeviceCaps( uint, int )
 269    uint GetObjectW( uint, uint, uint ) -> GetObject
 270    uint GetPixel( uint, uint, uint )
 271    uint GetStockObject( uint )
 272    uint GetTextExtentPoint32W( uint, uint, uint, SIZE ) -> GetTextExtentPoint32
 273    uint GetTextMetricsW( uint, TEXTMETRIC ) -> GetTextMetrics
 274    uint LineTo( uint, int, int )
 275    uint MoveToEx( uint, int, int, POINT )
 276    uint PatBlt( uint, int, int, int, int, uint )
 277    uint RemoveFontResourceW( uint ) -> RemoveFontResource
 278    //uint ReleaseDC( uint, uint )
 279    uint SelectObject( uint, uint )   
 280    uint SetBkMode( uint, uint )
 281    uint SetBkColor( uint, uint )
 282    uint SetBrushOrgEx( uint, int, int, POINT )
 283    uint SetTextColor( uint, uint )
 284    uint SetROP2( uint, uint )
 285    //uint SetStretchBltMode( uint, uint )
 286    uint StretchBlt( uint, uint, uint, uint, uint, uint, uint, uint, uint, uint, uint )
 287    uint TextOutW( uint, uint, uint, uint, uint ) -> TextOut
 288    uint BitBlt( uint, uint, uint, uint, uint, uint, uint, uint, uint )
 289    uint CreateRectRgn( uint, uint, uint, uint )
 290    int CombineRgn( uint, uint, uint, uint )
 291    uint SetRectRgn( uint, int, int, int, int )
 292    int SelectClipRgn( uint, uint )   
 293    uint GetTextMetricsW( uint, TEXTMETRIC) -> GetTextMetrics
 294    int IntersectClipRect( uint, int, int, int, int )
 295    int ExcludeClipRect( uint, int, int, int, int )
 296    uint GetClipBox( uint, RECT )
 297 }
 298 define
 299 {
 300    HWND_TOP        = 0
 301    HWND_BOTTOM     = 1
 302    HWND_TOPMOST    = -1
 303    HWND_NOTOPMOST  = -2
 304 
 305    DCX_WINDOW           = 0x00000001
 306    DCX_CACHE            = 0x00000002
 307    DCX_NORESETATTRS     = 0x00000004
 308    DCX_CLIPCHILDREN     = 0x00000008
 309    DCX_CLIPSIBLINGS     = 0x00000010
 310    DCX_PARENTCLIP       = 0x00000020
 311    
 312    DCX_EXCLUDERGN       = 0x00000040
 313    DCX_INTERSECTRGN     = 0x00000080
 314    
 315    DCX_EXCLUDEUPDATE    = 0x00000100
 316    DCX_INTERSECTUPDATE  = 0x00000200
 317    
 318    DCX_LOCKWINDOWUPDATE = 0x00000400
 319    
 320    DCX_VALIDATE         = 0x00200000
 321 
 322 }
 323 import "user32"
 324 {
 325    uint AdjustWindowRect( RECT, uint, uint )
 326    uint BeginPaint( uint, PAINTSTRUCT )
 327    uint BringWindowToTop( uint )
 328    uint CallWindowProcW( uint, uint, uint, uint, uint ) -> CallWindowProc
 329    uint CheckDlgButton( uint, uint, uint )
 330    uint CheckMenuItem( uint, uint, uint )
 331    uint CheckMenuRadioItem( uint, uint, uint, uint, uint )
 332    uint ClientToScreen( uint, POINT )
 333    uint CreateAcceleratorTableW( uint, uint ) -> CreateAcceleratorTable
 334    uint CreateIconIndirect( ICONINFO )      
 335    uint CreateMenu()
 336    uint CreatePopupMenu()
 337    uint CreateWindowExW( uint, uint, uint, uint, uint, uint, uint, 
 338        uint, uint, uint, uint, uint ) -> CreateWindowEx
 339    uint DefWindowProcW( uint, uint, uint, uint ) -> DefWindowProc   
 340    uint DestroyAcceleratorTable( uint )
 341    uint DestroyIcon( uint )
 342    uint DestroyMenu( uint )
 343    uint DestroyWindow( uint )
 344    uint DispatchMessageW( uint ) -> DispatchMessage
 345    uint DrawFocusRect( uint, RECT )
 346    uint DrawFrameControl( uint, RECT, uint, uint )
 347    uint DrawIcon( uint, int, int, uint )
 348    uint DrawIconEx( uint, int, int, uint, int, int, uint, uint, uint )
 349    uint DrawMenuBar( uint )   
 350    uint DrawTextW( uint, uint, int, RECT, uint ) -> DrawText
 351    uint EnumThreadWindows( uint, uint, uint )
 352    uint EnableMenuItem( uint, uint, uint )
 353    uint EnableWindow( uint, uint )
 354    uint EndDialog( uint, uint )
 355    uint EndPaint( uint, PAINTSTRUCT )
 356    uint FillRect( uint, RECT, uint )   
 357    uint FindWindowExW( uint, uint, uint, uint ) -> FindWindowEx
 358    uint FrameRect( uint, RECT, uint )
 359    uint GetActiveWindow()
 360    uint GetClassInfoExW( uint, uint, WNDCLASSEX ) -> GetClassInfo
 361    uint GetClassNameW( uint, uint, uint ) -> GetClassName
 362    uint GetClientRect( uint, RECT )
 363    uint GetCursorPos( POINT )
 364    uint GetIconInfo( uint, ICONINFO )
 365    uint GetDC( uint )
 366    uint GetDCEx( uint, uint, uint )
 367    uint GetDlgItem( uint, uint )
 368    uint GetDlgItemTextW( uint, uint, uint, uint ) -> GetDlgItemText
 369    uint GetFocus( )
 370    uint GetForegroundWindow( )
 371    uint GetKeyState( uint )
 372    uint GetMenuItemCount( uint )   
 373    uint GetMenuItemID( uint, uint )   
 374    uint GetMenuItemInfoW(  uint, uint, uint, 
 375                            MENUITEMINFO ) -> GetMenuItemInfo
 376    uint GetMenuItemRect( uint, uint, uint, RECT )
 377    uint GetMenuDefaultItem( uint, uint, uint )
 378    uint GetMenuPosFromID( uint, uint )
 379    uint GetMenuState(uint, uint, uint )
 380    uint GetMessageW( uint, uint, uint, uint ) -> GetMessage
 381    uint GetMessagePos()
 382    uint GetParent( uint )
 383    uint GetScrollInfo( uint, uint, SCROLLINFO ) 
 384    uint GetSysColor( uint )
 385    uint GetSysColorBrush( uint )
 386    uint GetSystemMetrics( uint )
 387    uint GetTopWindow( uint )
 388    uint GetWindow( uint, uint )   
 389    uint GetWindowDC( uint )
 390    uint GetWindowuintW( uint, uint ) -> GetWindowuint
 391    uint GetWindowLongW( uint, uint ) -> GetWindowLong
 392    uint GetWindowPlacement( uint, WINDOWPLACEMENT )
 393    uint GetWindowRect( uint, RECT )
 394    int  GetWindowRgn( uint, uint )
 395    uint GetWindowTextW( uint, uint, uint ) -> GetWindowText
 396    uint GetWindowTextLengthW( uint ) -> GetWindowTextLength        
 397    uint InsertMenuItemW( uint, uint, uint, MENUITEMINFO ) -> InsertMenuItem
 398    uint InvalidateRect( uint, RECT, uint )
 399    uint InvalidateRgn( uint, uint, uint )
 400    uint IsDlgButtonChecked( uint, uint )
 401    uint IsIconic( uint )
 402    uint IsWindow( uint )
 403    uint IsWindowEnabled( uint )
 404    uint IsWindowVisible( uint )
 405    uint IsZoomed( uint )    
 406    uint LoadBitmapW( uint, uint ) -> LoadBitmap
 407    uint LoadCursorW( uint, uint ) -> LoadCursor
 408    uint LoadIconW( uint, uint ) -> LoadIcon
 409    uint LoadImageW( uint, uint, uint, uint, uint, uint ) -> LoadImage
 410    int  MenuItemFromPoint( uint, uint, int, int )
 411    uint MessageBoxW( uint, uint, uint, uint ) -> MessageBox
 412    uint ModifyMenuW( uint, uint, uint, uint, uint ) -> ModifyMenu
 413    uint MoveWindow( uint, int, int, int, int, uint )
 414    uint PostMessageW( uint, uint, uint, uint ) -> PostMessage
 415         PostQuitMessage( uint )
 416    uint PtInRect( RECT, uint, uint )
 417    uint RegisterClassExW( uint ) -> RegisterClassEx
 418    uint ReleaseCapture()
 419    uint ReleaseDC( uint, uint )
 420    uint RemoveMenu( uint, uint, uint )
 421    uint ScreenToClient( uint, POINT )
 422    uint SendDlgItemMessageW( uint, uint, uint, uint, uint ) -> SendDlgItemMessage
 423    uint SendMessageW( uint, uint, uint, uint ) -> SendMessage
 424    uint SendNotifyMessageW( uint, uint, uint, uint ) -> SendNotifyMessage
 425    uint SetActiveWindow( uint )
 426    uint SetClassuintW( uint, int, uint ) -> SetClassuint
 427    uint SetCapture( uint )
 428    uint SetCursor( uint )
 429    uint SetDlgItemTextw( uint, uint, uint ) -> SetDlgItemText
 430    uint SetFocus( uint )
 431    uint SetForegroundWindow( uint )
 432    uint SetMenu( uint, uint )
 433    uint SetMenuItemInfoW( uint, uint, uint, MENUITEMINFO ) -> SetMenuItemInfo
 434    uint SetParent( uint, uint )
 435    int  SetScrollInfo( uint, uint, SCROLLINFO, uint )
 436    //int SetScrollPos( uint, int, int, uint )
 437    uint SetScrollRange( uint, int, int, int, uint )
 438    uint SetWindowuintW( uint, int, uint ) -> SetWindowuint
 439    uint SetWindowLongW( uint, uint, uint ) -> SetWindowLong
 440    uint SetWindowPlacement( uint, WINDOWPLACEMENT )
 441    uint SetWindowPos( uint, uint, int, int, int, int, uint )
 442    uint SetWindowTextW( uint, uint ) -> SetWindowText
 443    uint ShowScrollBar( uint, int, uint )
 444    uint ShowWindow( uint, uint )      
 445    uint TrackMouseEvent( TRACKMOUSEEVENT )
 446    uint TrackPopupMenuEx( uint, uint, int, int, uint, uint )   
 447    uint TranslateAcceleratorW( uint, uint, uint ) -> TranslateAccelerator
 448    uint TranslateMessage( uint )
 449    uint UpdateWindow( uint )
 450 	uint SetScrollPos( uint, uint, uint, uint )
 451 	uint ScrollWindowEx( uint, uint, uint, uint, uint, uint, uint, uint )
 452 	uint GetClientRect( uint, uint )   
 453    uint ChildWindowFromPointEx( uint, int, int, uint )
 454    uint WindowFromPoint( int, int )   
 455    uint GetDesktopWindow() 
 456    uint ClipCursor( RECT )       
 457    int  SetWindowRgn( uint, uint, uint )      
 458    uint RedrawWindow( uint, RECT, uint, uint )
 459    uint ReleaseCapture()
 460    uint DrawEdge( uint, RECT, uint, uint )
 461 }
 462 
 463 type INITCOMMONCONTROLSEX {
 464     uint dwSize
 465     uint dwICC
 466 } 
 467 
 468 import "comctl32" {
 469    uint ImageList_Create( uint, uint, uint, uint, uint )
 470    uint ImageList_Destroy( uint )
 471    uint ImageList_Duplicate( uint )
 472    uint ImageList_GetIcon( uint, int, uint )
 473    uint ImageList_GetIconSize( uint, uint, uint )
 474    int  ImageList_ReplaceIcon( uint, int, uint )
 475 
 476         InitCommonControls()
 477    uint InitCommonControlsEx( INITCOMMONCONTROLSEX )
 478 }
 479 
 480 /*import "shell32"
 481 {
 482 uint ExtractIconW( uint, uint, uint ) -> ExtractIcon
 483 }*/
 484 
 485 import "kernel32"
 486 {
 487    Sleep( uint )
 488    FreeConsole()
 489    AllocConsole()
 490    uint GetCurrentThreadId()
 491    uint LoadLibraryExA( uint, uint, uint )->LoadLibraryEx
 492    uint EnumResourceNamesW( uint, uint, uint, uint )->EnumResourceNames
 493    uint LockResource( uint )
 494    uint LoadResource( uint, uint )
 495    uint FindResourceW( uint, uint, uint )->FindResource
 496    uint SizeofResource( uint, uint )   
 497 }
 498 
 499 define {
 500 
 501 GWL_WNDPROC      = -4
 502 GWL_HINSTANCE    = -6
 503 GWL_HWNDPARENT   = -8
 504 GWL_STYLE        = -16
 505 GWL_EXSTYLE      = -20
 506 GWL_USERDATA     = -21
 507 GWL_ID           = -12
 508 
 509    
 510 SW_HIDE            = 0
 511 SW_SHOWNORMAL      = 1
 512 SW_NORMAL          = 1
 513 SW_SHOWMINIMIZED   = 2
 514 SW_SHOWMAXIMIZED   = 3
 515 SW_MAXIMIZE        = 3
 516 SW_SHOWNOACTIVATE  = 4
 517 SW_SHOW            = 5
 518 SW_MINIMIZE        = 6
 519 SW_SHOWMINNOACTIVE = 7
 520 SW_SHOWNA          = 8
 521 SW_RESTORE         = 9
 522 SW_SHOWDEFAULT     = 10
 523 SW_MAX             = 10
 524 
 525 SIZE_RESTORED      = 0
 526 SIZE_MINIMIZED     = 1
 527 SIZE_MAXIMIZED     = 2
 528 SIZE_MAXSHOW       = 3
 529 SIZE_MAXHIDE       = 4
 530 
 531 SWP_NOSIZE         = 0x0001
 532 SWP_NOMOVE         = 0x0002
 533 SWP_NOZORDER       = 0x0004
 534 SWP_NOREDRAW       = 0x0008
 535 SWP_NOACTIVATE     = 0x0010
 536 
 537 SWP_FRAMECHANGED   = 0x0020
 538 SWP_SHOWWINDOW     = 0x0040
 539 SWP_HIDEWINDOW     = 0x0080
 540 SWP_NOCOPYBITS     = 0x0100
 541 SWP_NOOWNERZORDER  = 0x0200
 542 SWP_NOSENDCHANGING = 0x0400
 543 
 544 
 545 MK_LBUTTON =         0x0001
 546 MK_RBUTTON =         0x0002
 547 MK_SHIFT   =         0x0004
 548 MK_CONTROL =         0x0008
 549 MK_MBUTTON =         0x0010
 550 
 551 VK_LBUTTON         = 0x01
 552 VK_RBUTTON         = 0x02
 553 VK_CANCEL          = 0x03
 554 VK_MBUTTON         = 0x04
 555 VK_BACK            = 0x08
 556 VK_TAB             = 0x09
 557 VK_RETURN          = 0x0D
 558 VK_SHIFT           = 0x10
 559 VK_CONTROL         = 0x11
 560 VK_MENU            = 0x12
 561 VK_ESCAPE          = 0x1B
 562 VK_SPACE           = 0x20
 563 VK_END             = 0x23
 564 VK_HOME            = 0x24
 565 VK_LEFT            = 0x25
 566 VK_UP              = 0x26
 567 VK_RIGHT           = 0x27
 568 VK_DOWN            = 0x28
 569 VK_INSERT          = 0x2D
 570 VK_DELETE          = 0x2E
 571 
 572 VK_LWIN            = 0x5B
 573 VK_RWIN            = 0x5C
 574 VK_APPS            = 0x5D
 575 
 576 VK_F1              = 0x70
 577 VK_F2              = 0x71
 578 VK_F3              = 0x72
 579 VK_F4              = 0x73
 580 VK_F5              = 0x74
 581 VK_F6              = 0x75
 582 VK_F7              = 0x76
 583 VK_F8              = 0x77
 584 VK_F9              = 0x78
 585 VK_F10             = 0x79
 586 VK_F11             = 0x7A
 587 VK_F12             = 0x7B
 588 
 589 
 590 WS_EX_DLGMODALFRAME  = 0x00000001
 591 WS_EX_NOPARENTNOTIFY = 0x00000004
 592 WS_EX_TOPMOST        = 0x00000008
 593 WS_EX_ACCEPTFILES    = 0x00000010
 594 WS_EX_TRANSPARENT    = 0x00000020
 595 WS_EX_MDICHILD       = 0x00000040
 596 WS_EX_TOOLWINDOW     = 0x00000080
 597 WS_EX_WINDOWEDGE     = 0x00000100
 598 WS_EX_CLIENTEDGE     = 0x00000200
 599 WS_EX_CONTEXTHELP    = 0x00000400
 600 WS_EX_RIGHT          = 0x00001000
 601 WS_EX_RTLREADING     = 0x00002000
 602 WS_EX_LEFTSCROLLBAR  = 0x00004000
 603 WS_EX_CONTROLPARENT  = 0x00010000
 604 WS_EX_STATICEDGE     = 0x00020000
 605 WS_EX_APPWINDOW      = 0x00040000
 606 
 607 WS_OVERLAPPED  =     0x00000000
 608 WS_POPUP       =     0x80000000
 609 WS_CHILD       =     0x40000000
 610 WS_MINIMIZE    =     0x20000000
 611 WS_VISIBLE     =     0x10000000
 612 WS_DISABLED    =     0x08000000
 613 WS_CLIPSIBLINGS  =   0x04000000
 614 WS_CLIPCHILDREN  =   0x02000000
 615 WS_MAXIMIZE    =     0x01000000
 616 WS_BORDER      =     0x00800000
 617 WS_DLGFRAME    =     0x00400000
 618 WS_CAPTION     =     $WS_BORDER | $WS_DLGFRAME  
 619 WS_VSCROLL     =     0x00200000
 620 WS_HSCROLL     =     0x00100000
 621 WS_SYSMENU     =     0x00080000
 622 WS_THICKFRAME  =     0x00040000
 623 WS_GROUP       =     0x00020000
 624 WS_TABSTOP     =     0x00010000
 625 
 626 WS_MINIMIZEBOX  =    0x00020000
 627 WS_MAXIMIZEBOX  =    0x00010000
 628 
 629 WS_OVERLAPPEDWINDOW  = $WS_OVERLAPPED | $WS_CAPTION | $WS_SYSMENU | $WS_THICKFRAME | $WS_MINIMIZEBOX | $WS_MAXIMIZEBOX
 630 WS_POPUPWINDOW = $WS_POPUP | $WS_BORDER | $WS_SYSMENU
 631 
 632 DS_MODALFRAME   = 0x80 
 633 
 634 CCS_TOP                 = 0x00000001
 635 CCS_NOMOVEY             = 0x00000002
 636 CCS_BOTTOM              = 0x00000003
 637 CCS_NORESIZE            = 0x00000004
 638 CCS_NOPARENTALIGN       = 0x00000008
 639 CCS_ADJUSTABLE          = 0x00000020
 640 CCS_NODIVIDER           = 0x00000040
 641 CCS_VERT                = 0x00000080
 642 
 643 
 644 MB_OK                       = 0x00000000
 645 MB_OKCANCEL                 = 0x00000001
 646 MB_ABORTRETRYIGNORE         = 0x00000002
 647 MB_YESNOCANCEL              = 0x00000003
 648 MB_YESNO                    = 0x00000004
 649 MB_RETRYCANCEL              = 0x00000005
 650 MB_CANCELTRYCONTINUE        = 0x00000006
 651 MB_ICONHAND                 = 0x00000010
 652 MB_ICONERROR                = $MB_ICONHAND
 653 MB_ICONQUESTION             = 0x00000020
 654 MB_ICONEXCLAMATION          = 0x00000030
 655 MB_ICONASTERISK             = 0x00000040
 656 MB_USERICON                 = 0x00000080
 657 MB_DEFBUTTON1               = 0x00000000
 658 MB_DEFBUTTON2               = 0x00000100
 659 MB_DEFBUTTON3               = 0x00000200
 660 MB_DEFBUTTON4               = 0x00000300
 661 MB_APPLMODAL                = 0x00000000
 662 MB_SYSTEMMODAL              = 0x00001000
 663 MB_TASKMODAL                = 0x00002000
 664 MB_HELP                     = 0x00004000
 665 MB_NOFOCUS                  = 0x00008000
 666 MB_SETFOREGROUND            = 0x00010000
 667 MB_DEFAULT_DESKTOP_ONLY     = 0x00020000
 668 MB_TOPMOST                  = 0x00040000
 669 MB_RIGHT                    = 0x00080000
 670 MB_RTLREADING               = 0x00100000
 671 
 672 IDOK         = 1
 673 IDCANCEL     = 2
 674 IDABORT      = 3
 675 IDRETRY      = 4
 676 IDIGNORE     = 5
 677 IDYES        = 6
 678 IDNO         = 7
 679 IDCLOSE      = 8
 680 IDHELP       = 9
 681 IDTRYAGAIN   = 10
 682 IDCONTINUE   = 11
 683 
 684 WA_INACTIVE    = 0
 685 WA_ACTIVE      = 1
 686 WA_CLICKACTIVE = 2
 687 
 688 SM_CXMENUCHECK = 71
 689 
 690 ETO_OPAQUE  = 0x0002
 691 ETO_CLIPPED = 0x0004
 692 
 693 }
 694 
 695 define <export> {
 696    WM_CREATE          = 0x0001
 697    WM_DESTROY         = 0x0002
 698    WM_MOVE            = 0x0003
 699    WM_SIZE            = 0x0005
 700    WM_ACTIVATE        = 0x0006
 701    WM_SETFOCUS        = 0x0007
 702    WM_KILLFOCUS       = 0x0008
 703    WM_ENABLE          = 0x000A
 704    WM_SETREDRAW       = 0x000B
 705    WM_SETTEXT         = 0x000C
 706    WM_GETTEXT         = 0x000D
 707    WM_GETTEXTLENGTH   = 0x000E
 708    WM_PAINT           = 0x000F
 709    WM_CLOSE           = 0x0010
 710    WM_QUERYENDSESSION = 0x0011
 711    WM_QUIT            = 0x0012
 712    WM_ERASEBKGND      = 0x0014
 713    WM_SYSCOLORCHANGE  = 0x0015
 714 
 715    WM_SHOWWINDOW      = 0x0018
 716    WM_SETTINGCHANGE   = 0x001A
 717    WM_ACTIVATEAPP     = 0x001C
 718    WM_FONTCHANGE      = 0x001D
 719 
 720    WM_SETCURSOR       = 0x0020
 721    WM_GETMINMAXINFO   = 0x0024
 722    WM_DRAWITEM        = 0x002B
 723    WM_MEASUREITEM     = 0x002C
 724    WM_VKEYTOITEM      = 0x002E
 725    WM_CHARTOITEM      = 0x002F
 726    WM_SETFONT         = 0x0030
 727    WM_GETFONT         = 0x0031
 728 
 729    WM_WINDOWPOSCHANGING = 0x0046
 730    WM_WINDOWPOSCHANGED  = 0x0047
 731 
 732    WM_NOTIFY          = 0x004E
 733    WM_GETICON         = 0x007F
 734    WM_CONTEXTMENU     = 0x007B
 735    WM_SETICON         = 0x0080
 736    WM_NCCREATE        = 0x0081
 737    WM_NCDESTROY       = 0x0082
 738    WM_NCCALCSIZE      = 0x0083
 739    WM_NCHITTEST       = 0x0084
 740    WM_NCPAINT         = 0x0085
 741    WM_NCACTIVATE      = 0x0086
 742    WM_GETDLGCODE      = 0x0087
 743    WM_SYNCPAINT       = 0x0088
 744    WM_NCMOUSEMOVE     = 0x00A0
 745    WM_NCLBUTTONDOWN   = 0x00A1
 746    WM_NCLBUTTONUP     = 0x00A2
 747    WM_NCLBUTTONDBLCLK = 0x00A3
 748    WM_NCRBUTTONDOWN   = 0x00A4
 749    WM_NCRBUTTONUP     = 0x00A5
 750    WM_NCRBUTTONDBLCLK = 0x00A6
 751    WM_NCMBUTTONDOWN   = 0x00A7
 752    WM_NCMBUTTONUP     = 0x00A8
 753    WM_NCMBUTTONDBLCLK = 0x00A9
 754 
 755    WM_GETDLGCODE      = 0x0087
 756 
 757    WM_KEYDOWN         = 0x0100
 758    WM_KEYUP           = 0x0101
 759    WM_CHAR            = 0x0102
 760    WM_SYSKEYDOWN      = 0x0104
 761    WM_SYSKEYUP        = 0x0105
 762    WM_SYSCHAR         = 0x0106
 763    WM_COMMAND         = 0x0111
 764    WM_HSCROLL         = 0x0114
 765    WM_VSCROLL         = 0x0115
 766    WM_INITMENU        = 0x0116
 767    WM_INITMENUPOPUP   = 0x0117
 768    WM_MENUSELECT      = 0x011F
 769    WM_ENTERIDLE       = 0x0121
 770    
 771    WM_CTLCOLORMSGBOX    = 0x0132
 772    WM_CTLCOLOREDIT      = 0x0133
 773    WM_CTLCOLORLISTBOX   = 0x0134
 774    WM_CTLCOLORBTN       = 0x0135
 775    WM_CTLCOLORDLG       = 0x0136
 776    WM_CTLCOLORSCROLLBAR = 0x0137
 777    WM_CTLCOLORSTATIC    = 0x0138   
 778    
 779    WM_MOUSEACTIVATE   = 0x021
 780    WM_MOUSEMOVE       = 0x0200
 781    WM_LBUTTONDOWN     = 0x0201
 782    WM_LBUTTONUP       = 0x0202
 783    WM_LBUTTONDBLCLK   = 0x0203
 784    WM_RBUTTONDOWN     = 0x0204
 785    WM_RBUTTONUP       = 0x0205   
 786    WM_RBUTTONDBLCLK   = 0x0206
 787    WM_MBUTTONDOWN     = 0x0207
 788    WM_MBUTTONUP       = 0x0208
 789    WM_MBUTTONDBLCLK   = 0x0209
 790    WM_MOUSEWHEEL      = 0x020A
 791    WM_MOUSELEAVE      = 0x02A3
 792    
 793    WM_SIZING          = 0x0214
 794    WM_CAPTURECHANGED  = 0x0215
 795    WM_MOVING          = 0x0216
 796    
 797    WM_USER            = 0x0400
 798 }
 799 
 800 
 801 define {
 802 DEFAULT_GUI_FONT = 17
 803 }
 804 
 805 define {
 806    CS_VREDRAW         = 0x0001
 807    CS_HREDRAW         = 0x0002
 808    CS_DBLCLKS         = 0x0008
 809    WS_OVERLAPPEDWINDOW  = 0x00CF0000
 810    
 811    CWP_SKIPTRANSPARENT =0x0004
 812    CWP_SKIPINVISIBLE = 0x0001
 813    //WM_DESTROY         = 0x0002
 814 }
 815 
 816 define {
 817 BLACK_BRUSH       =  4
 818 
 819    OEM_FIXED_FONT    =  10
 820    ANSI_FIXED_FONT   =  11
 821 
 822    DEFAULT_GUI_FONT  =  17
 823    DEFAULT_CHARSET = 1
 824 
 825    FW_BOLD         = 700
 826 
 827    LF_FACESIZE   = 32
 828    LOGPIXELSY    = 90
 829    
 830    PATINVERT = 0x005A0049 
 831    
 832    TRANSPARENT   = 1
 833    OPAQUE        = 2
 834 
 835    PS_SOLID      = 0
 836    PS_DASH       = 1       /* -------  */
 837    PS_DOT        = 2       /* .......  */
 838    PS_INSIDEFRAME	 = 6
 839    R2_NOT  =    6
 840    RGN_OR=2
 841    RGN_DIFF=4
 842 
 843 
 844 }
 845 
 846 operator RECT =( RECT left right )
 847 {
 848    left.left = right.left
 849    left.top = right.top
 850    left.right = right.right
 851    left.bottom = right.bottom
 852    return left
 853 }
 854 operator POINT =( POINT left right )
 855 {
 856    left.x = right.x 
 857    left.y = right.y
 858    return left
 859 }
 860 
 861 define {
 862 IMAGE_BITMAP       = 0
 863 IMAGE_ICON         = 1
 864 IMAGE_CURSOR       = 2
 865 
 866 
 867 BM_GETCHECK        = 0x00F0
 868 BM_SETCHECK        = 0x00F1
 869 BM_GETSTATE        = 0x00F2
 870 BM_SETSTATE        = 0x00F3
 871 BM_SETSTYLE        = 0x00F4
 872 BM_CLICK           = 0x00F5
 873 BM_GETIMAGE        = 0x00F6
 874 BM_SETIMAGE        = 0x00F7
 875 
 876 
 877 BN_CLICKED   = 0
 878 
 879 
 880 BS_TEXT            = 0x00000000
 881 BS_DEFPUSHBUTTON   = 0x00000001
 882 BS_CHECKBOX        = 0x00000002
 883 BS_AUTOCHECKBOX    = 0x00000003
 884 BS_RADIOBUTTON     = 0x00000004
 885 BS_3STATE          = 0x00000005
 886 BS_AUTO3STATE      = 0x00000006
 887 BS_GROUPBOX        = 0x00000007
 888 BS_USERBUTTON      = 0x00000008
 889 BS_AUTORADIOBUTTON = 0x00000009
 890 BS_OWNERDRAW       = 0x0000000B
 891 BS_ICON            = 0x00000040
 892 BS_BITMAP          = 0x00000080
 893 BS_LEFT            = 0x00000100
 894 BS_RIGHT           = 0x00000200
 895 BS_CENTER          = 0x00000300
 896 BS_TOP             = 0x00000400
 897 BS_BOTTOM          = 0x00000800
 898 BS_VCENTER         = 0x00000C00
 899 BS_PUSHLIKE        = 0x00001000
 900 BS_MULTILINE       = 0x00002000
 901 BS_NOTIFY          = 0x00004000
 902 BS_FLAT            = 0x00008000
 903 BS_PUSHLIKE        = 0x00001000
 904 
 905 
 906 
 907 BST_UNCHECKED      = 0x0000
 908 BST_CHECKED        = 0x0001
 909 BST_INDETERMINATE  = 0x0002
 910 BST_PUSHED         = 0x0004
 911 BST_FOCUS          = 0x0008
 912 }
 913 
 914 define {
 915 
 916 ES_MULTILINE   = 0x0004
 917 ES_PASSWORD    = 0x0020
 918 ES_AUTOVSCROLL = 0x0040
 919 ES_AUTOHSCROLL = 0x0080
 920 ES_READONLY    = 0x0800
 921 ES_WANTRETURN  = 0x1000
 922 
 923 EN_CHANGE      = 0x0300
 924 EN_UPDATE      = 0x0400
 925 
 926 EM_GETLIMITTEXT     = 0x00D5
 927 EM_LIMITTEXT        = 0x00C5
 928 EM_SETSEL           = 0x00B1
 929 EM_GETSEL           = 0x00B0
 930 EM_SETPASSWORDCHAR  = 0x00CC
 931 EM_GETPASSWORDCHAR  = 0x00D2
 932 EM_SETREADONLY      = 0x00CF
 933 EM_SETMODIFY        = 0x00B9
 934 }
 935 
 936 
 937 //Menu
 938 define {
 939  MF_INSERT           = 0x00000000
 940  MF_CHANGE           = 0x00000080
 941  MF_APPEND           = 0x00000100
 942  MF_DELETE           = 0x00000200
 943  MF_REMOVE           = 0x00001000
 944 
 945  MF_BYCOMMAND        = 0x00000000
 946  MF_BYPOSITION       = 0x00000400
 947 
 948  MF_SEPARATOR        = 0x00000800
 949 
 950  MF_ENABLED          = 0x00000000
 951  MF_GRAYED           = 0x00000001
 952  MF_DISABLED         = 0x00000002
 953 
 954  MF_UNCHECKED        = 0x00000000
 955  MF_CHECKED          = 0x00000008
 956  MF_USECHECKBITMAPS  = 0x00000200
 957 
 958  MF_STRING           = 0x00000000
 959  MF_BITMAP           = 0x00000004
 960  MF_OWNERDRAW        = 0x00000100
 961 
 962  MF_POPUP            = 0x00000010
 963  MF_MENUBARBREAK     = 0x00000020
 964  MF_MENUBREAK        = 0x00000040
 965 
 966  MF_UNHILITE         = 0x00000000
 967  MF_HILITE           = 0x00000080
 968 
 969 
 970  MF_DEFAULT          = 0x00001000
 971 
 972  MF_SYSMENU          = 0x00002000
 973  MF_HELP             = 0x00004000
 974 
 975  MF_RIGHTJUSTIFY     = 0x00004000
 976 
 977 
 978  MF_MOUSESELECT      = 0x00008000
 979  MF_END              = 0x00000080
 980 
 981  MFT_STRING          =$MF_STRING
 982  MFT_BITMAP          =$MF_BITMAP
 983  MFT_MENUBARBREAK    =$MF_MENUBARBREAK
 984  MFT_MENUBREAK       =$MF_MENUBREAK
 985  MFT_OWNERDRAW       =$MF_OWNERDRAW
 986  MFT_RADIOCHECK      =0x00000200
 987  MFT_SEPARATOR       =$MF_SEPARATOR
 988  MFT_RIGHTORDER      =0x00002000
 989  MFT_RIGHTJUSTIFY    =$MF_RIGHTJUSTIFY
 990  
 991  
 992 MIIM_STATE       = 0x00000001
 993 MIIM_ID          = 0x00000002
 994 MIIM_SUBMENU     = 0x00000004
 995 MIIM_CHECKMARKS  = 0x00000008
 996 MIIM_TYPE        = 0x00000010
 997 MIIM_DATA        = 0x00000020
 998 MIIM_BITMAP      = 0x00000080
 999 
1000 MFS_GRAYED        = 0x00000003
1001 MFS_DISABLED      =  $MFS_GRAYED
1002 MFS_CHECKED       =  $MF_CHECKED
1003 MFS_HILITE        =  $MF_HILITE
1004 MFS_ENABLED       =  $MF_ENABLED
1005 MFS_UNCHECKED     =  $MF_UNCHECKED
1006 MFS_UNHILITE      =  $MF_UNHILITE
1007 MFS_DEFAULT       =  $MF_DEFAULT
1008 
1009 TPM_LEFTBUTTON  = 0x0000
1010 TPM_RIGHTBUTTON = 0x0002
1011 TPM_LEFTALIGN   = 0x0000
1012 TPM_CENTERALIGN = 0x0004
1013 TPM_RIGHTALIGN  = 0x0008
1014 
1015 TPM_TOPALIGN        = 0x0000
1016 TPM_VCENTERALIGN    = 0x0010
1017 TPM_BOTTOMALIGN     = 0x0020
1018 
1019 TPM_HORIZONTAL      = 0x0000
1020 TPM_VERTICAL        = 0x0040
1021 TPM_NONOTIFY        = 0x0080
1022 TPM_RETURNCMD       = 0x0100
1023 
1024 
1025 }
1026 
1027 
1028 
1029 define {
1030    IDC_ARROW    =32512
1031    IDC_IBEAM    =32513
1032    IDC_WAIT     =32514
1033    IDC_CROSS    =32515
1034    IDC_UPARROW  =32516
1035    IDC_SIZE     =32640
1036    IDC_ICON     =32641
1037    IDC_SIZENWSE =32642
1038    IDC_SIZENESW =32643
1039    IDC_SIZEWE   =32644
1040    IDC_SIZENS   =32645
1041    IDC_SIZEALL  =32646
1042    IDC_NO       =32648
1043    IDC_HAND        =32649
1044    IDC_APPSTARTING =32650
1045    IDC_HELP        =32651
1046 }
1047 
1048  
1049 
1050 define {
1051 TCS_FLATBUTTONS  = 0x0008
1052 TCS_BUTTONS      = 0x0100
1053 TCS_TOOLTIPS     = 0x4000
1054 
1055 TCM_FIRST        =      0x1300
1056 //TCM_INSERTITEMA  =  ($TCM_FIRST + 7)
1057 TCM_SETIMAGELIST =  ($TCM_FIRST + 3)
1058 TCM_INSERTITEMW  =  ($TCM_FIRST + 62)
1059 TCM_DELETEITEM   =  ($TCM_FIRST + 8)
1060 //TCM_GETITEMA     =  ($TCM_FIRST + 5)
1061 TCM_GETITEMW     =  ($TCM_FIRST + 60)
1062 //TCM_SETITEMA     =  ($TCM_FIRST + 6)
1063 TCM_SETITEMW     =  ($TCM_FIRST + 61)
1064 TCM_ADJUSTRECT   =  ($TCM_FIRST + 40)
1065 TCM_GETCURSEL    =  ($TCM_FIRST + 11)
1066 TCM_SETCURSEL    =  ($TCM_FIRST + 12)
1067 TCM_GETTOOLTIPS  =  ($TCM_FIRST + 45)
1068 TCM_SETTOOLTIPS  =  ($TCM_FIRST + 46)
1069 TCM_SETMINTABWIDTH = ($TCM_FIRST + 49)
1070 TCM_GETITEMW     =  ($TCM_FIRST + 60)
1071 
1072 TCIF_TEXT        =       0x0001
1073 TCIF_IMAGE       =       0x0002
1074 TCIF_RTLREADING  =       0x0004
1075 TCIF_PARAM       =       0x0008
1076 TCIF_STATE       =       0x0010
1077 
1078 //TCN_FIRST -550 0xFFFFFDD9//
1079 TCN_SELCHANGE    = -551//(TCN_FIRST - 1)
1080 
1081 
1082 }
1083 
1084 //vComboBox
1085 define {
1086 CB_GETEDITSEL               = 0x0140
1087 CB_LIMITTEXT                = 0x0141
1088 CB_SETEDITSEL               = 0x0142
1089 CB_ADDSTRING                = 0x0143
1090 CB_DELETESTRING             = 0x0144
1091 CB_DIR                      = 0x0145
1092 CB_GETCOUNT                 = 0x0146
1093 CB_GETCURSEL                = 0x0147
1094 CB_GETLBTEXT                = 0x0148
1095 CB_GETLBTEXTLEN             = 0x0149
1096 CB_INSERTSTRING             = 0x014A
1097 CB_RESETCONTENT             = 0x014B
1098 CB_FINDSTRING               = 0x014C
1099 CB_SELECTSTRING             = 0x014D
1100 CB_SETCURSEL                = 0x014E
1101 CB_SHOWDROPDOWN             = 0x014F
1102 CB_GETITEMDATA              = 0x0150
1103 CB_SETITEMDATA              = 0x0151
1104 CB_GETDROPPEDCONTROLRECT    = 0x0152
1105 CB_SETITEMHEIGHT            = 0x0153
1106 CB_GETITEMHEIGHT            = 0x0154
1107 CB_SETEXTENDEDUI            = 0x0155
1108 CB_GETEXTENDEDUI            = 0x0156
1109 CB_GETDROPPEDSTATE          = 0x0157
1110 CB_FINDSTRINGEXACT          = 0x0158
1111 CB_SETLOCALE                = 0x0159
1112 CB_GETLOCALE                = 0x015A
1113 CB_GETTOPINDEX              = 0x015b
1114 CB_SETTOPINDEX              = 0x015c
1115 CB_GETHORIZONTALEXTENT      = 0x015d
1116 CB_SETHORIZONTALEXTENT      = 0x015e
1117 CB_GETDROPPEDWIDTH          = 0x015f
1118 CB_SETDROPPEDWIDTH          = 0x0160
1119 CB_INITSTORAGE              = 0x0161
1120 CB_MSGMAX                   = 0x0162
1121 CB_MSGMAX                   = 0x015B
1122 
1123 CBS_SIMPLE            = 0x0001
1124 CBS_DROPDOWN          = 0x0002
1125 CBS_DROPDOWNLIST      = 0x0003
1126 CBS_OWNERDRAWFIXED    = 0x0010
1127 CBS_OWNERDRAWVARIABLE = 0x0020
1128 CBS_AUTOHSCROLL       = 0x0040
1129 CBS_OEMCONVERT        = 0x0080
1130 CBS_SORT              = 0x0100
1131 CBS_HASSTRINGS        = 0x0200
1132 CBS_NOINTEGRALHEIGHT  = 0x0400
1133 CBS_DISABLENOSCROLL   = 0x0800
1134 CBS_UPPERCASE         = 0x2000
1135 CBS_LOWERCASE         = 0x4000
1136 
1137 CBN_ERRSPACE        =-1
1138 CBN_SELCHANGE       =1
1139 CBN_DBLCLK          =2
1140 CBN_SETFOCUS        =3
1141 CBN_KILLFOCUS       =4
1142 CBN_EDITCHANGE      =5
1143 CBN_EDITUPDATE      =6
1144 CBN_DROPDOWN        =7
1145 CBN_CLOSEUP         =8
1146 CBN_SELENDOK        =9
1147 CBN_SELENDCANCEL    =10
1148 
1149 }
1150 
1151 //Border
1152 define {
1153 BDR_RAISEDOUTER =0x0001
1154 BDR_SUNKENOUTER =0x0002
1155 BDR_RAISEDINNER =0x0004
1156 BDR_SUNKENINNER =0x0008
1157 
1158 BDR_OUTER       =0x0003
1159 BDR_INNER       =0x000c
1160 
1161 EDGE_RAISED     =($BDR_RAISEDOUTER | $BDR_RAISEDINNER)
1162 EDGE_SUNKEN     =($BDR_SUNKENOUTER | $BDR_SUNKENINNER)
1163 EDGE_ETCHED     =($BDR_SUNKENOUTER | $BDR_RAISEDINNER)
1164 EDGE_BUMP       =($BDR_RAISEDOUTER | $BDR_SUNKENINNER)
1165 
1166 BF_LEFT         =0x0001
1167 BF_TOP          =0x0002
1168 BF_RIGHT        =0x0004
1169 BF_BOTTOM       =0x0008
1170 
1171 BF_TOPLEFT      =($BF_TOP | $BF_LEFT)
1172 BF_TOPRIGHT     =($BF_TOP | $BF_RIGHT)
1173 BF_BOTTOMLEFT   =($BF_BOTTOM | $BF_LEFT)
1174 BF_BOTTOMRIGHT  =($BF_BOTTOM | $BF_RIGHT)
1175 BF_RECT         =($BF_LEFT | $BF_TOP | $BF_RIGHT | $BF_BOTTOM)
1176 
1177 BF_DIAGONAL     =0x0010
1178 
1179 BF_DIAGONAL_ENDTOPRIGHT     =($BF_DIAGONAL | $BF_TOP | $BF_RIGHT)
1180 BF_DIAGONAL_ENDTOPLEFT      =($BF_DIAGONAL | $BF_TOP | $BF_LEFT)
1181 BF_DIAGONAL_ENDBOTTOMLEFT   =($BF_DIAGONAL | $BF_BOTTOM | $BF_LEFT)
1182 BF_DIAGONAL_ENDBOTTOMRIGHT  =($BF_DIAGONAL | $BF_BOTTOM | $BF_RIGHT)
1183 
1184 
1185 BF_MIDDLE       =0x0800  /* Fill in the middle */
1186 BF_SOFT         =0x1000  /* For softer buttons */
1187 BF_ADJUST       =0x2000  /* Calculate the space left over */
1188 BF_FLAT         =0x4000  /* For flat rather than 3D borders */
1189 BF_MONO         =0x8000  /* For monochrome borders */
1190 }
1191 
1192 //DrawText() Format Flags
1193 define {
1194 DT_TOP              = 0x00000000
1195 DT_LEFT             = 0x00000000
1196 DT_CENTER           = 0x00000001
1197 DT_RIGHT            = 0x00000002
1198 DT_VCENTER          = 0x00000004
1199 DT_BOTTOM           = 0x00000008
1200 DT_WORDBREAK        = 0x00000010
1201 DT_SINGLELINE       = 0x00000020
1202 DT_EXPANDTABS       = 0x00000040
1203 DT_TABSTOP          = 0x00000080
1204 DT_NOCLIP           = 0x00000100
1205 DT_EXTERNALLEADING  = 0x00000200
1206 DT_CALCRECT         = 0x00000400
1207 DT_NOPREFIX         = 0x00000800
1208 DT_INTERNAL         = 0x00001000
1209 
1210 
1211 DT_EDITCONTROL      = 0x00002000
1212 DT_PATH_ELLIPSIS    = 0x00004000
1213 DT_END_ELLIPSIS     = 0x00008000
1214 DT_MODIFYSTRING     = 0x00010000
1215 DT_RTLREADING       = 0x00020000
1216 DT_WORD_ELLIPSIS    = 0x0004000
1217 }
1218 
1219 //Scroll Bar 
1220 define { 
1221 SB_HORZ           =  0
1222 SB_VERT           =  1
1223 SB_CTL            =  2
1224 SB_BOTH           =  3
1225 
1226 SB_LINEUP         =  0
1227 SB_LINELEFT       =  0
1228 SB_LINEDOWN       =  1
1229 SB_LINERIGHT      =  1
1230 SB_PAGEUP         =  2
1231 SB_PAGELEFT       =  2
1232 SB_PAGEDOWN       =  3
1233 SB_PAGERIGHT      =  3
1234 SB_THUMBPOSITION  =  4
1235 SB_THUMBTRACK     =  5
1236 SB_TOP            =  6
1237 SB_LEFT           =  6
1238 SB_BOTTOM         =  7
1239 SB_RIGHT          =  7
1240 SB_ENDSCROLL      =  8
1241 
1242 
1243 SBM_SETPOS                  = 0x00E0 
1244 SBM_GETPOS                  = 0x00E1 
1245 SBM_SETRANGE                = 0x00E2 
1246 SBM_SETRANGEREDRAW          = 0x00E6 
1247 SBM_GETRANGE                = 0x00E3 
1248 SBM_ENABLE_ARROWS           = 0x00E4 
1249 
1250 SBM_SETSCROLLINFO           = 0x00E9
1251 SBM_GETSCROLLINFO           = 0x00EA
1252 
1253 SIF_RANGE           = 0x0001
1254 SIF_PAGE            = 0x0002
1255 SIF_POS             = 0x0004
1256 SIF_DISABLENOSCROLL = 0x0008
1257 SIF_TRACKPOS        = 0x0010
1258 SIF_ALL             =($SIF_RANGE | $SIF_PAGE | $SIF_POS | $SIF_TRACKPOS)
1259 }
1260 
1261 //syscolors
1262 define {
1263 COLOR_SCROLLBAR         =0
1264 COLOR_BACKGROUND        =1
1265 COLOR_ACTIVECAPTION     =2
1266 COLOR_INACTIVECAPTION   =3
1267 COLOR_MENU              =4
1268 COLOR_WINDOW            =5
1269 COLOR_WINDOWFRAME       =6
1270 COLOR_MENUTEXT          =7
1271 COLOR_WINDOWTEXT        =8
1272 COLOR_CAPTIONTEXT       =9
1273 COLOR_ACTIVEBORDER      =10
1274 COLOR_INACTIVEBORDER    =11
1275 COLOR_APPWORKSPACE      =12
1276 COLOR_HIGHLIGHT         =13
1277 COLOR_HIGHLIGHTTEXT     =14
1278 COLOR_BTNFACE           =15
1279 COLOR_BTNSHADOW         =16
1280 COLOR_GRAYTEXT          =17
1281 COLOR_BTNTEXT           =18
1282 COLOR_INACTIVECAPTIONTEXT =19
1283 COLOR_BTNHIGHLIGHT      =20
1284 
1285 
1286 COLOR_3DDKSHADOW        =21
1287 COLOR_3DLIGHT           =22
1288 COLOR_INFOTEXT          =23
1289 COLOR_INFOBK            =24
1290 }
1291 
1292 
1293 
1294 define {
1295 OFN_READONLY                 = 0x00000001
1296 OFN_OVERWRITEPROMPT          = 0x00000002
1297 OFN_HIDEREADONLY             = 0x00000004
1298 OFN_NOCHANGEDIR              = 0x00000008
1299 OFN_SHOWHELP                 = 0x00000010
1300 OFN_ENABLEHOOK               = 0x00000020
1301 OFN_ENABLETEMPLATE           = 0x00000040
1302 OFN_ENABLETEMPLATEHANDLE     = 0x00000080
1303 OFN_NOVALIDATE               = 0x00000100
1304 OFN_ALLOWMULTISELECT         = 0x00000200
1305 OFN_EXTENSIONDIFFERENT       = 0x00000400
1306 OFN_PATHMUSTEXIST            = 0x00000800
1307 OFN_FILEMUSTEXIST            = 0x00001000
1308 OFN_CREATEPROMPT             = 0x00002000
1309 OFN_SHAREAWARE               = 0x00004000
1310 OFN_NOREADONLYRETURN         = 0x00008000
1311 OFN_NOTESTFILECREATE         = 0x00010000
1312 OFN_NONETWORKBUTTON          = 0x00020000
1313 OFN_NOLONGNAMES              = 0x00040000
1314 OFN_EXPLORER                 = 0x00080000
1315 OFN_NODEREFERENCELINKS       = 0x00100000
1316 OFN_LONGNAMES                = 0x00200000
1317 OFN_ENABLEINCLUDENOTIFY      = 0x00400000
1318 OFN_ENABLESIZING             = 0x00800000
1319 
1320 CC_RGBINIT              = 0x00000001
1321 CC_FULLOPEN             = 0x00000002
1322 CC_PREVENTFULLOPEN      = 0x00000004
1323 CC_SHOWHELP             = 0x00000008
1324 CC_ENABLEHOOK           = 0x00000010
1325 CC_ENABLETEMPLATE       = 0x00000020
1326 CC_ENABLETEMPLATEHANDLE = 0x00000040
1327 CC_SOLIDCOLOR           = 0x00000080
1328 CC_ANYCOLOR             = 0x00000100
1329 }
1330 
1331 
1332 type OPENFILENAME{  
1333     uint       lStructSize 
1334     uint       hwndOwner 
1335     uint       hInstance 
1336     uint       lpstrFilter 
1337     uint       lpstrCustomFilter 
1338     uint       nMaxCustFilter 
1339     uint       nFilterIndex 
1340     uint       lpstrFile 
1341     uint       nMaxFile 
1342     uint       lpstrFileTitle 
1343     uint       nMaxFileTitle 
1344     uint       lpstrInitialDir 
1345     uint       lpstrTitle 
1346     uint       Flags 
1347     ushort     nFileOffset 
1348     ushort     nFileExtension 
1349     uint       lpstrDefExt 
1350     uint       lCustData 
1351     uint       lpfnHook 
1352     uint       lpTemplateName 
1353 } 
1354 
1355 type CHOOSECOLOR {
1356     uint lStructSize
1357     uint hwndOwner
1358     uint hInstance
1359     uint rgbResult
1360     uint lpCustColors
1361     uint Flags
1362     uint lCustData
1363     uint lpfnHook
1364     uint lpTemplateName
1365 } 
1366 
1367 type CHOOSEFONT {
1368     uint lStructSize
1369     uint hwndOwner
1370     uint hDC
1371     uint lpLogFont
1372     int iPointSize
1373     uint Flags
1374     uint rgbColors
1375     uint lCustData
1376     uint lpfnHook
1377     uint lpTemplateName
1378     uint hInstance
1379     uint lpszStyle
1380     ushort nFontType
1381     ushort miss
1382     int nSizeMin
1383     int nSizeMax
1384 }
1385 
1386 define {
1387 CF_SCREENFONTS             = 0x00000001
1388 CF_PRINTERFONTS            = 0x00000002
1389 CF_BOTH                    = ($CF_SCREENFONTS | $CF_PRINTERFONTS)
1390 /*CF_SHOWHELP                = 0x00000004
1391 CF_ENABLEHOOK              = 0x00000008
1392 CF_ENABLETEMPLATE          = 0x00000010
1393 CF_ENABLETEMPLATEHANDLE    = 0x00000020*/
1394 CF_INITTOLOGFONTSTRUCT     = 0x00000040
1395 /*CF_USESTYLE                = 0x00000080*/
1396 CF_EFFECTS                 = 0x00000100
1397 /*CF_APPLY                   = 0x00000200
1398 CF_ANSIONLY                = 0x00000400
1399 CF_NOVECTORFONTS           = 0x00000800
1400 CF_NOSIMULATIONS           = 0x00001000
1401 CF_LIMITSIZE               = 0x00002000
1402 CF_FIXEDPITCHONLY          = 0x00004000
1403 CF_WYSIWYG                 = 0x00008000 // must also have CF_SCREENFONTS & CF_PRINTERFONTS
1404 CF_FORCEFONTEXIST          = 0x00010000
1405 CF_SCALABLEONLY            = 0x00020000
1406 CF_TTONLY                  = 0x00040000
1407 CF_NOFACESEL               = 0x00080000
1408 CF_NOSTYLESEL              = 0x00100000
1409 CF_NOSIZESEL               = 0x00200000
1410 CF_SELECTSCRIPT            = 0x00400000
1411 CF_NOSCRIPTSEL             = 0x00800000
1412 CF_NOVERTFONTS             = 0x01000000*/
1413 }
1414 
1415 import "comdlg32"{
1416    uint GetOpenFileNameW( OPENFILENAME ) -> GetOpenFileName
1417    uint GetSaveFileNameW( OPENFILENAME ) -> GetSaveFileName
1418    uint ChooseColorW( CHOOSECOLOR ) -> ChooseColor
1419    uint ChooseFontW( CHOOSEFONT ) -> ChooseFont
1420 }
1421 
1422 
1423 import "comctl32"{   
1424    uint ImageList_Add( uint, uint, uint )
1425    uint ImageList_AddMasked( uint, uint, uint )
1426    uint ImageList_BeginDrag( uint, uint, uint, uint )
1427    uint ImageList_EndDrag()
1428    uint ImageList_DragShowNolock( uint )
1429    uint ImageList_DragEnter( uint, uint, uint )
1430    uint ImageList_DragLeave( uint )
1431    uint ImageList_DragMove( uint, uint )
1432    uint ImageList_SetOverlayImage( uint, uint, uint )
1433    
1434 }
1435 
1436 //--------------------------------------------------
1437 //Static
1438 define {
1439 SS_LEFT             = 0x00000000
1440 SS_CENTER           = 0x00000001
1441 SS_RIGHT            = 0x00000002
1442 SS_ICON             = 0x00000003
1443 SS_BLACKRECT        = 0x00000004
1444 SS_GRAYRECT         = 0x00000005
1445 SS_WHITERECT        = 0x00000006
1446 SS_BLACKFRAME       = 0x00000007
1447 SS_GRAYFRAME        = 0x00000008
1448 SS_WHITEFRAME       = 0x00000009
1449 SS_USERITEM         = 0x0000000A
1450 SS_SIMPLE           = 0x0000000B
1451 SS_LEFTNOWORDWRAP   = 0x0000000C
1452 SS_OWNERDRAW        = 0x0000000D
1453 SS_BITMAP           = 0x0000000E
1454 SS_ENHMETAFILE      = 0x0000000F
1455 SS_ETCHEDHORZ       = 0x00000010
1456 SS_ETCHEDVERT       = 0x00000011
1457 SS_ETCHEDFRAME      = 0x00000012
1458 SS_TYPEMASK         = 0x0000001F
1459 SS_REALSIZECONTROL  = 0x00000040
1460 SS_NOPREFIX         = 0x00000080
1461 SS_NOTIFY           = 0x00000100
1462 SS_CENTERIMAGE      = 0x00000200
1463 SS_RIGHTJUST        = 0x00000400
1464 SS_REALSIZEIMAGE    = 0x00000800
1465 SS_SUNKEN           = 0x00001000
1466 SS_EDITCONTROL      = 0x00002000
1467 SS_ENDELLIPSIS      = 0x00004000
1468 SS_PATHELLIPSIS     = 0x00008000
1469 SS_WORDELLIPSIS     = 0x0000C000
1470 SS_ELLIPSISMASK     = 0x0000C000
1471 }
1472 
1473 
1474 //--------------------------------------------------
1475 //TreeView
1476 
1477 type TVITEM {
1478     uint    mask
1479     uint    hItem
1480     uint    state
1481     uint    stateMask
1482     uint    pszText
1483     int     cchTextMax
1484     int     iImage
1485     int     iSelectedImage
1486     int     cChildren
1487     uint    lParam
1488 }
1489 
1490 type TVITEMEX {
1491     uint mask
1492     uint hItem
1493     uint state
1494     uint stateMask
1495     uint pszText
1496     int cchTextMax
1497     int iImage
1498     int iSelectedImage
1499     int cChildren
1500     uint lParam
1501     int iIntegral
1502 } 
1503 
1504 type TVINSERTSTRUCT {
1505    uint hParent
1506    uint hInsertAfter
1507    TVITEMEX item
1508 }
1509 
1510 type NMTREEVIEWW {
1511     NMHDR     hdr
1512     uint      action
1513     TVITEM    itemOld
1514     TVITEM    itemNew
1515     POINT     ptDrag
1516 } 
1517 
1518 type NMTVDISPINFO {
1519     NMHDR hdr 
1520     TVITEM item 
1521 }
1522 
1523 type TVHITTESTINFO {
1524     POINT pt
1525     uint flags
1526     uint hItem
1527 }
1528 
1529 
1530 define {
1531 //Styles
1532 TVS_HASBUTTONS          = 0x0001
1533 TVS_HASLINES            = 0x0002
1534 TVS_LINESATROOT         = 0x0004
1535 TVS_EDITLABELS          = 0x0008
1536 TVS_DISABLEDRAGDROP     = 0x0010
1537 TVS_SHOWSELALWAYS       = 0x0020
1538 TVS_RTLREADING          = 0x0040
1539 TVS_NOTOOLTIPS          = 0x0080
1540 TVS_CHECKBOXES          = 0x0100
1541 TVS_TRACKSELECT         = 0x0200
1542 TVS_SINGLEEXPAND        = 0x0400
1543 TVS_INFOTIP             = 0x0800
1544 TVS_FULLROWSELECT       = 0x1000
1545 TVS_NOSCROLL            = 0x2000
1546 TVS_NONEVENHEIGHT       = 0x4000
1547 
1548 //Messages
1549 TV_FIRST             = 0x1100
1550 TVM_INSERTITEMW         = $TV_FIRST + 50
1551 TVM_DELETEITEM          = $TV_FIRST + 1
1552 TVM_EXPAND              = $TV_FIRST + 2      
1553 TVM_GETITEMRECT         = $TV_FIRST + 4
1554 TVM_GETCOUNT            = $TV_FIRST + 5
1555 TVM_GETINDENT           = $TV_FIRST + 6
1556 TVM_SETINDENT           = $TV_FIRST + 7
1557 TVM_GETIMAGELIST        = $TV_FIRST + 8
1558 TVM_SETIMAGELIST        = $TV_FIRST + 9
1559 TVM_GETNEXTITEM         = $TV_FIRST + 10
1560 TVM_SELECTITEM          = $TV_FIRST + 11
1561 TVM_GETITEMW            = $TV_FIRST + 62
1562 TVM_SETITEMW            = $TV_FIRST + 63
1563 TVM_EDITLABELW          = $TV_FIRST + 65
1564 TVM_GETEDITCONTROL      = $TV_FIRST + 15
1565 TVM_GETVISIBLECOUNT     = $TV_FIRST + 16
1566 TVM_HITTEST             = $TV_FIRST + 17
1567 TVM_CREATEDRAGIMAGE     = $TV_FIRST + 18 
1568 TVM_SORTCHILDREN        = $TV_FIRST + 19
1569 TVM_ENSUREVISIBLE       = $TV_FIRST + 20
1570 TVM_SORTCHILDRENCB      = $TV_FIRST + 21
1571 TVM_ENDEDITLABELNOW     = $TV_FIRST + 22
1572 TVM_GETISEARCHSTRINGW   = $TV_FIRST + 64
1573 TVM_SETTOOLTIPS         = $TV_FIRST + 24
1574 TVM_GETTOOLTIPS         = $TV_FIRST + 25
1575 TVM_SETINSERTMARK       = $TV_FIRST + 26
1576 TVM_SETITEMHEIGHT       = $TV_FIRST + 27
1577 TVM_GETITEMHEIGHT       = $TV_FIRST + 28
1578 TVM_SETBKCOLOR          = $TV_FIRST + 29
1579 TVM_SETTEXTCOLOR        = $TV_FIRST + 30
1580 TVM_GETBKCOLOR          = $TV_FIRST + 31
1581 TVM_GETTEXTCOLOR        = $TV_FIRST + 32
1582 TVM_SETSCROLLTIME       = $TV_FIRST + 33
1583 TVM_GETSCROLLTIME       = $TV_FIRST + 34
1584 TVM_SETINSERTMARKCOLOR  = $TV_FIRST + 37
1585 TVM_GETINSERTMARKCOLOR  = $TV_FIRST + 38
1586 
1587 //
1588 
1589 NM_FIRST = 0
1590 NM_OUTOFMEMORY          = $NM_FIRST - 1
1591 NM_CLICK                = $NM_FIRST - 2 
1592 NM_DBLCLK               = $NM_FIRST - 3
1593 NM_RETURN               = $NM_FIRST - 4
1594 NM_RCLICK               = $NM_FIRST - 5 
1595 NM_RDBLCLK              = $NM_FIRST - 6
1596 NM_SETFOCUS             = $NM_FIRST - 7
1597 NM_KILLFOCUS            = $NM_FIRST - 8
1598 NM_CUSTOMDRAW           = $NM_FIRST - 12
1599 NM_HOVER                = $NM_FIRST - 13
1600 NM_NCHITTEST            = $NM_FIRST - 14
1601 NM_KEYDOWN              = $NM_FIRST - 15
1602 NM_RELEASEDCAPTURE      = $NM_FIRST - 16
1603 NM_SETCURSOR            = $NM_FIRST - 17
1604 NM_CHAR                 = $NM_FIRST - 18
1605 
1606 //Notification messages
1607 TVN_FIRST               = - 400
1608 TVN_SELCHANGINGW        = $TVN_FIRST - 50 
1609 TVN_SELCHANGEDW         = $TVN_FIRST - 51
1610 TVN_GETDISPINFOW        = $TVN_FIRST - 52
1611 TVN_SETDISPINFOW        = $TVN_FIRST - 53
1612 TVN_ITEMEXPANDINGW      = $TVN_FIRST - 54
1613 TVN_ITEMEXPANDEDW       = $TVN_FIRST - 55
1614 TVN_BEGINDRAGW          = $TVN_FIRST - 56
1615 TVN_BEGINRDRAGW         = $TVN_FIRST - 57
1616 TVN_DELETEITEMW         = $TVN_FIRST - 58
1617 TVN_BEGINLABELEDITW     = $TVN_FIRST - 59
1618 TVN_ENDLABELEDITW       = $TVN_FIRST - 60
1619 TVN_KEYDOWN             = $TVN_FIRST - 12
1620 TVN_GETINFOTIPA         = $TVN_FIRST - 13
1621 TVN_GETINFOTIPW         = $TVN_FIRST - 14
1622 TVN_SINGLEEXPAND        = $TVN_FIRST - 15
1623 
1624 TVI_ROOT                =0xFFFF0000
1625 TVI_FIRST               =0xFFFF0001
1626 TVI_LAST                =0xFFFF0002
1627 TVI_SORT                =0xFFFF0003
1628 
1629 //Item mask
1630 TVIF_TEXT               = 0x0001
1631 TVIF_IMAGE              = 0x0002
1632 TVIF_PARAM              = 0x0004
1633 TVIF_STATE              = 0x0008
1634 TVIF_HANDLE             = 0x0010
1635 TVIF_SELECTEDIMAGE      = 0x0020
1636 TVIF_CHILDREN           = 0x0040
1637 TVIF_INTEGRAL           = 0x0080
1638 
1639 TVIS_SELECTED           = 0x0002
1640 TVIS_CUT                = 0x0004
1641 TVIS_DROPHILITED        = 0x0008
1642 TVIS_BOLD               = 0x0010
1643 TVIS_EXPANDED           = 0x0020
1644 TVIS_EXPANDEDONCE       = 0x0040
1645 TVIS_EXPANDPARTIAL      = 0x0080
1646 TVIS_OVERLAYMASK        = 0x0F00
1647 TVIS_STATEIMAGEMASK     = 0xF000
1648 TVIS_USERMASK           = 0xF000
1649 
1650 TVGN_ROOT               = 0x0000
1651 TVGN_NEXT               = 0x0001
1652 TVGN_PREVIOUS           = 0x0002
1653 TVGN_PARENT             = 0x0003
1654 TVGN_CHILD              = 0x0004
1655 TVGN_FIRSTVISIBLE       = 0x0005
1656 TVGN_NEXTVISIBLE        = 0x0006
1657 TVGN_PREVIOUSVISIBLE    = 0x0007
1658 TVGN_DROPHILITE         = 0x0008
1659 TVGN_CARET              = 0x0009
1660 TVGN_LASTVISIBLE        = 0x000A
1661 
1662 TVE_COLLAPSE            = 0x0001
1663 TVE_EXPAND              = 0x0002
1664 TVE_TOGGLE              = 0x0003
1665 TVE_EXPANDPARTIAL       = 0x4000
1666 TVE_COLLAPSERESET       = 0x8000
1667 
1668 TVSIL_NORMAL            = 0
1669 TVSIL_STATE             = 2
1670 
1671 TVHT_NOWHERE            = 0x0001
1672 TVHT_ONITEMICON         = 0x0002
1673 TVHT_ONITEMLABEL        = 0x0004
1674 TVHT_ONITEMINDENT       = 0x0008
1675 TVHT_ONITEMBUTTON       = 0x0010
1676 TVHT_ONITEMRIGHT        = 0x0020
1677 TVHT_ONITEMSTATEICON    = 0x0040
1678 
1679 TVHT_ABOVE              = 0x0100
1680 TVHT_BELOW              = 0x0200
1681 TVHT_TORIGHT            = 0x0400
1682 TVHT_TOLEFT             = 0x0800
1683 
1684 }
1685 
1686 
1687 //--------------------------------------------------
1688 //ListView
1689 
1690 type LVITEM
1691 {
1692     uint mask
1693     int  iItem
1694     int  iSubItem
1695     uint state
1696     uint stateMask
1697     uint pszText
1698     int  cchTextMax
1699     int  iImage
1700     uint lParam
1701     int  iIndent
1702 }
1703 
1704 type LVCOLUMN
1705 {
1706     uint mask 
1707     int fmt 
1708     int cx 
1709     uint pszText 
1710     int cchTextMax 
1711     int iSubItem
1712     int iImage
1713     int iOrder
1714 }
1715 
1716 type LVFINDINFO {
1717     uint flags
1718     uint psz
1719     uint lParam
1720     POINT pt
1721     uint vkDirection
1722 } 
1723 
1724 type NMLISTVIEW
1725 {
1726     NMHDR   hdr
1727     int     iItem
1728     int     iSubItem
1729     uint    uNewState
1730     uint    uOldState
1731     uint    uChanged
1732     POINT   ptAction
1733     uint    lParam
1734 }
1735 
1736 type NMITEMACTIVATE
1737 {
1738     NMHDR   hdr
1739     int     iItem
1740     int     iSubItem
1741     uint    uNewState
1742     uint    uOldState
1743     uint    uChanged
1744     POINT   ptAction
1745     uint    lParam
1746     uint    uKeyFlags
1747 }
1748 
1749 type NMLVDISPINFO {
1750     NMHDR hdr
1751     LVITEM item
1752 }
1753 
1754 type NMLVODSTATECHANGE {
1755     NMHDR hdr
1756     int iFrom
1757     int iTo
1758     uint uNewState
1759     uint uOldState
1760 }
1761 
1762 define
1763 {
1764 //Styles
1765 LVS_ICON                = 0x0000
1766 LVS_REPORT              = 0x0001
1767 LVS_SMALLICON           = 0x0002
1768 LVS_LIST                = 0x0003
1769 LVS_TYPEMASK            = 0x0003
1770 LVS_SINGLESEL           = 0x0004
1771 LVS_SHOWSELALWAYS       = 0x0008
1772 LVS_SORTASCENDING       = 0x0010
1773 LVS_SORTDESCENDING      = 0x0020
1774 LVS_SHAREIMAGELISTS     = 0x0040
1775 LVS_NOLABELWRAP         = 0x0080
1776 LVS_AUTOARRANGE         = 0x0100
1777 LVS_EDITLABELS          = 0x0200
1778 LVS_OWNERDATA           = 0x1000
1779 LVS_NOSCROLL            = 0x2000
1780 LVS_TYPESTYLEMASK       = 0xfc00
1781 LVS_ALIGNTOP            = 0x0000
1782 LVS_ALIGNLEFT           = 0x0800
1783 LVS_ALIGNMASK           = 0x0c00
1784 LVS_OWNERDRAWFIXED      = 0x0400
1785 LVS_NOCOLUMNHEADER      = 0x4000
1786 LVS_NOSORTHEADER        = 0x8000
1787 
1788 LVS_EX_GRIDLINES        = 0x00000001
1789 LVS_EX_SUBITEMIMAGES    = 0x00000002
1790 LVS_EX_CHECKBOXES       = 0x00000004
1791 LVS_EX_TRACKSELECT      = 0x00000008
1792 LVS_EX_HEADERDRAGDROP   = 0x00000010
1793 LVS_EX_FULLROWSELECT    = 0x00000020
1794 LVS_EX_ONECLICKACTIVATE = 0x00000040
1795 LVS_EX_TWOCLICKACTIVATE = 0x00000080
1796 LVS_EX_FLATSB           = 0x00000100
1797 LVS_EX_REGIONAL         = 0x00000200
1798 LVS_EX_INFOTIP          = 0x00000400
1799 LVS_EX_UNDERLINEHOT     = 0x00000800
1800 LVS_EX_UNDERLINECOLD    = 0x00001000
1801 LVS_EX_MULTIWORKAREAS   = 0x00002000
1802 
1803 
1804 //Messages
1805 LVM_FIRST               = 0x1000
1806 LVM_GETBKCOLOR          = $LVM_FIRST + 0
1807 LVM_SETBKCOLOR          = $LVM_FIRST + 1
1808 LVM_GETIMAGELIST        = $LVM_FIRST + 2
1809 LVM_SETIMAGELIST        = $LVM_FIRST + 3
1810 LVM_GETITEMCOUNT        = $LVM_FIRST + 4
1811 
1812 LVM_DELETEITEM          = $LVM_FIRST + 8
1813 LVM_DELETEALLITEMS      = $LVM_FIRST + 9
1814 LVM_GETCALLBACKMASK     = $LVM_FIRST + 10
1815 LVM_SETCALLBACKMASK     = $LVM_FIRST + 11
1816 LVM_GETNEXTITEM         = $LVM_FIRST + 12
1817 
1818 LVM_GETITEMRECT         = $LVM_FIRST + 14
1819 LVM_SETITEMPOSITION     = $LVM_FIRST + 15
1820 LVM_GETITEMPOSITION     = $LVM_FIRST + 16
1821 
1822 LVM_HITTEST             = $LVM_FIRST + 18
1823 LVM_ENSUREVISIBLE       = $LVM_FIRST + 19
1824 LVM_SCROLL              = $LVM_FIRST + 20
1825 LVM_REDRAWITEMS         = $LVM_FIRST + 21
1826 LVM_ARRANGE             = $LVM_FIRST + 22
1827 LVM_GETEDITCONTROL      = $LVM_FIRST + 24
1828 LVM_GETCOLUMNW          = $LVM_FIRST + 95
1829 LVM_INSERTCOLUMNW       = $LVM_FIRST + 97
1830 LVM_DELETECOLUMN        = $LVM_FIRST + 28
1831 LVM_GETCOLUMNWIDTH      = $LVM_FIRST + 29
1832 LVM_SETCOLUMNWIDTH      = $LVM_FIRST + 30
1833 LVM_GETHEADER           = $LVM_FIRST + 31
1834 LVM_CREATEDRAGIMAGE     = $LVM_FIRST + 33
1835 LVM_GETVIEWRECT         = $LVM_FIRST + 34
1836 LVM_GETTEXTCOLOR        = $LVM_FIRST + 35
1837 LVM_SETTEXTCOLOR        = $LVM_FIRST + 36
1838 LVM_GETTEXTBKCOLOR      = $LVM_FIRST + 37
1839 LVM_SETTEXTBKCOLOR      = $LVM_FIRST + 38
1840 LVM_GETTOPINDEX         = $LVM_FIRST + 39
1841 LVM_GETCOUNTPERPAGE     = $LVM_FIRST + 40
1842 LVM_GETORIGIN           = $LVM_FIRST + 41
1843 LVM_UPDATE              = $LVM_FIRST + 42
1844 LVM_SETITEMSTATE        = $LVM_FIRST + 43
1845 LVM_GETITEMSTATE        = $LVM_FIRST + 44
1846 LVM_SETITEMCOUNT        = $LVM_FIRST + 47
1847 LVM_GETSELECTEDCOUNT    = $LVM_FIRST + 50
1848 LVM_GETITEMSPACING      = $LVM_FIRST + 51
1849 LVM_GETISEARCHSTRINGA   = $LVM_FIRST + 52
1850 LVM_SETICONSPACING      = $LVM_FIRST + 53
1851 LVM_SETEXTENDEDLISTVIEWSTYLE = $LVM_FIRST + 54
1852 LVM_GETEXTENDEDLISTVIEWSTYLE = $LVM_FIRST + 55
1853 LVM_GETSUBITEMRECT      = $LVM_FIRST + 56
1854 LVM_SUBITEMHITTEST      = $LVM_FIRST + 57
1855 LVM_SETCOLUMNORDERARRAY = $LVM_FIRST + 58
1856 LVM_GETCOLUMNORDERARRAY = $LVM_FIRST + 59
1857 LVM_SETHOTITEM          = $LVM_FIRST + 60
1858 LVM_GETHOTITEM          = $LVM_FIRST + 61
1859 LVM_SETHOTCURSOR        = $LVM_FIRST + 62
1860 LVM_GETHOTCURSOR        = $LVM_FIRST + 63
1861 LVM_APPROXIMATEVIEWRECT = $LVM_FIRST + 64
1862 LVM_SETWORKAREAS        = $LVM_FIRST + 65
1863 LVM_GETSELECTIONMARK    = $LVM_FIRST + 66
1864 LVM_SETSELECTIONMARK    = $LVM_FIRST + 67
1865 LVM_GETWORKAREAS        = $LVM_FIRST + 70
1866 LVM_SETHOVERTIME        = $LVM_FIRST + 71
1867 LVM_GETHOVERTIME        = $LVM_FIRST + 72
1868 LVM_GETNUMBEROFWORKAREAS  = $LVM_FIRST + 73
1869 LVM_SETTOOLTIPS         = $LVM_FIRST + 74
1870 LVM_GETTOOLTIPS         = $LVM_FIRST + 78
1871 
1872 LVM_GETITEMW            = $LVM_FIRST + 75
1873 LVM_SETITEMW            = $LVM_FIRST + 76
1874 LVM_INSERTITEMW         = $LVM_FIRST + 77
1875 
1876 LVM_SORTITEMSEX         = $LVM_FIRST + 81
1877 LVM_FINDITEMW           = $LVM_FIRST + 83
1878 LVM_GETSTRINGWIDTHW     = $LVM_FIRST + 87
1879 
1880 LVM_SETCOLUMNW          = $LVM_FIRST + 96
1881 
1882 LVM_GETITEMTEXTW        = $LVM_FIRST + 115
1883 LVM_SETITEMTEXTW        = $LVM_FIRST + 116
1884 
1885 LVM_EDITLABELW          = $LVM_FIRST + 118
1886 
1887 LVM_SETBKIMAGEW         = $LVM_FIRST + 138
1888 LVM_GETBKIMAGEW         = $LVM_FIRST + 139
1889 
1890 //Notification messages
1891 LVN_FIRST               = -100
1892 LVN_ITEMCHANGING        = $LVN_FIRST - 0
1893 LVN_ITEMCHANGED         = $LVN_FIRST - 1
1894 LVN_INSERTITEM          = $LVN_FIRST - 2
1895 LVN_DELETEITEM          = $LVN_FIRST - 3
1896 LVN_DELETEALLITEMS      = $LVN_FIRST - 4
1897 LVN_BEGINLABELEDITW     = $LVN_FIRST - 75
1898 LVN_ENDLABELEDITW       = $LVN_FIRST - 76
1899 LVN_COLUMNCLICK         = $LVN_FIRST - 8
1900 LVN_BEGINDRAG           = $LVN_FIRST - 9
1901 LVN_BEGINRDRAG          = $LVN_FIRST - 11
1902 LVN_ODCACHEHINT         = $LVN_FIRST - 13
1903 LVN_ODFINDITEMW         = $LVN_FIRST - 79
1904 LVN_ITEMACTIVATE        = $LVN_FIRST - 14
1905 LVN_ODSTATECHANGED      = $LVN_FIRST - 15
1906 LVN_HOTTRACK            = $LVN_FIRST - 21
1907 LVN_GETDISPINFOW        = $LVN_FIRST - 77
1908 LVN_SETDISPINFOW        = $LVN_FIRST - 78
1909 
1910 
1911 //Item mask
1912 LVIF_TEXT               = 0x0001
1913 LVIF_IMAGE              = 0x0002
1914 LVIF_PARAM              = 0x0004
1915 LVIF_STATE              = 0x0008
1916 LVIF_INDENT             = 0x0010
1917 LVIF_NORECOMPUTE        = 0x0800
1918 
1919 //Item state
1920 LVIS_FOCUSED            = 0x0001
1921 LVIS_SELECTED           = 0x0002
1922 LVIS_CUT                = 0x0004
1923 LVIS_DROPHILITED        = 0x0008
1924 LVIS_ACTIVATING         = 0x0020
1925 LVIS_OVERLAYMASK        = 0x0F00
1926 LVIS_STATEIMAGEMASK     = 0xF000
1927 
1928 
1929 //LVM_GETNEXTITEM flags
1930 LVNI_ALL                = 0x0000
1931 LVNI_FOCUSED            = 0x0001
1932 LVNI_SELECTED           = 0x0002
1933 LVNI_CUT                = 0x0004
1934 LVNI_DROPHILITED        = 0x0008
1935 LVNI_ABOVE              = 0x0100
1936 LVNI_BELOW              = 0x0200
1937 LVNI_TOLEFT             = 0x0400
1938 LVNI_TORIGHT            = 0x0800
1939 
1940 //LVCOLUMN mask
1941 LVCF_FMT                = 0x0001
1942 LVCF_WIDTH              = 0x0002
1943 LVCF_TEXT               = 0x0004
1944 LVCF_SUBITEM            = 0x0008
1945 LVCF_IMAGE              = 0x0010
1946 LVCF_ORDER              = 0x0020
1947 
1948 LVCFMT_IMAGE            = 0x0800
1949 LVCFMT_BITMAP_ON_RIGHT  = 0x1000
1950 LVCFMT_COL_HAS_IMAGES   = 0x8000
1951 
1952 
1953 LVSIL_NORMAL            = 0
1954 LVSIL_SMALL             = 1
1955 LVSIL_STATE             = 2
1956 
1957 LVFI_PARAM              = 0x0001
1958 }
1959 
1960 type LVHITTESTINFO {
1961     POINT pt
1962     uint flags
1963     int iItem
1964     int iSubItem
1965 }
1966 
1967 define {
1968    theme_button = 0
1969    theme_toolbar = 1
1970    //theme_menu = 2
1971    theme_max = 20
1972    
1973 }
1974 
1975 define {
1976    BP_PUSHBUTTON = 1  
1977    BP_RADIOBUTTON = 2  
1978    BP_CHECKBOX = 3  
1979    BP_GROUPBOX = 4  
1980    BP_USERBUTTON = 5
1981    
1982    PBS_NORMAL = 1  
1983    PBS_HOT = 2  
1984    PBS_PRESSED = 3  
1985    PBS_DISABLED = 4  
1986    PBS_DEFAULTED = 5
1987    
1988 
1989    TP_BUTTON         =  1
1990    TS_NORMAL         =  1
1991    TS_HOT            =  2
1992    TS_PRESSED        =  3
1993    TS_DISABLED       =  4
1994    TS_CHECKED        =  5
1995    TS_HOTCHECKED     =  6
1996    CBS_UNCHECKEDNORMAL = 1
1997    CBS_UNCHECKEDHOT   = 2
1998    CBS_CHECKEDNORMAL  = 5
1999    CBS_CHECKEDHOT     = 6
2000 }
2001 
2002   
2003 //DRAWITEMSTRUCT.itemState
2004 define {
2005    ODS_SELECTED    = 0x0001
2006    ODS_GRAYED      = 0x0002
2007    ODS_DISABLED    = 0x0004
2008    ODS_CHECKED     = 0x0008
2009    ODS_FOCUS       = 0x0010
2010    ODS_DEFAULT         = 0x0020
2011    ODS_COMBOBOXEDIT    = 0x1000
2012    ODS_HOTLIGHT        = 0x0040
2013    ODS_INACTIVE        = 0x0080
2014    ODS_NOACCEL         = 0x0100
2015    ODS_NOFOCUSRECT     = 0x0200
2016 }
2017 
2018 //Image STATIC.PICTURE
2019 define 
2020 {
2021 STM_SETICON       =  0x0170
2022 STM_GETICON       =  0x0171
2023 STM_SETIMAGE      =  0x0172
2024 STM_GETIMAGE      =  0x0173
2025 STN_CLICKED       =  0
2026 STN_DBLCLK        =  1
2027 STN_ENABLE        =  2
2028 STN_DISABLE       =  3
2029 }
2030 
2031 //LoadImage
2032 define 
2033 {
2034 LR_DEFAULTCOLOR     = 0x0000
2035 LR_MONOCHROME       = 0x0001
2036 LR_COLOR            = 0x0002
2037 LR_COPYRETURNORG    = 0x0004
2038 LR_COPYDELETEORG    = 0x0008
2039 LR_LOADFROMFILE     = 0x0010
2040 LR_LOADTRANSPARENT  = 0x0020
2041 LR_DEFAULTSIZE      = 0x0040
2042 LR_VGACOLOR         = 0x0080
2043 LR_LOADMAP3DCOLORS  = 0x1000
2044 LR_CREATEDIBSECTION = 0x2000
2045 LR_COPYFROMRESOURCE = 0x4000
2046 LR_SHARED           = 0x8000
2047 }
2048 
2049 //DrawImageEx
2050 define {
2051 DI_MASK         = 0x0001
2052 DI_IMAGE        = 0x0002
2053 DI_NORMAL       = 0x0003
2054 DI_COMPAT       = 0x0004
2055 DI_DEFAULTSIZE  = 0x0008
2056 DI_NOMIRROR     = 0x0010
2057 }
2058 
2059 //GetCurrentObject
2060 define {
2061 OBJ_PEN             = 1
2062 OBJ_BRUSH           = 2
2063 OBJ_DC              = 3
2064 OBJ_METADC          = 4
2065 OBJ_PAL             = 5
2066 OBJ_FONT            = 6
2067 OBJ_BITMAP          = 7
2068 OBJ_REGION          = 8
2069 OBJ_METAFILE        = 9
2070 OBJ_MEMDC           = 10
2071 OBJ_EXTPEN          = 11
2072 OBJ_ENHMETADC       = 12
2073 OBJ_ENHMETAFILE     = 13
2074 OBJ_COLORSPACE      = 14
2075 }
2076 
2077 //TrackMouseEvent, TRACKMOUSEEVENT
2078 define {
2079 TME_HOVER       = 0x00000001
2080 TME_LEAVE       = 0x00000002
2081 TME_NONCLIENT   = 0x00000010
2082 TME_QUERY       = 0x40000000
2083 TME_CANCEL      = 0x80000000
2084 HOVER_DEFAULT   = 0xFFFFFFFF
2085 }
2086 
2087 //ToolbarWindow32
2088 type TBBUTTON {
2089     int      iBitmap 
2090     int      idCommand 
2091     byte     fsState 
2092     byte     fsStyle
2093     reserved bReserved[2]     // padding for alignment
2094     uint     dwData 
2095     uint     iString 
2096 } 
2097 
2098 type TBBUTTONINFO {
2099     uint cbSize
2100     uint dwMask
2101     int idCommand
2102     int iImage
2103     byte fsState
2104     byte fsStyle
2105     short cx
2106     uint lParam
2107     uint pszText
2108     int cchText
2109 }
2110 
2111 type NMTOOLBAR {
2112     NMHDR hdr
2113     int iItem
2114     TBBUTTON tbButton
2115     int cchText
2116     uint pszText
2117     RECT rcButton
2118 }
2119 
2120 define {
2121 TB_INSERTBUTTON         = $WM_USER + 67
2122 TB_ADDBUTTONS           = $WM_USER + 68
2123 TB_HITTEST              = $WM_USER + 69
2124 TB_DELETEBUTTON         = $WM_USER + 22
2125 TB_GETBUTTON            = $WM_USER + 23
2126 TB_BUTTONCOUNT          = $WM_USER + 24
2127 TB_COMMANDTOINDEX       = $WM_USER + 25
2128 TB_SAVERESTORE          = $WM_USER + 76
2129 TB_CUSTOMIZE            = $WM_USER + 27
2130 TB_ADDSTRING            = $WM_USER + 77
2131 TB_GETITEMRECT          = $WM_USER + 29
2132 TB_BUTTONSTRUCTSIZE     = $WM_USER + 30
2133 TB_SETBUTTONSIZE        = $WM_USER + 31
2134 TB_SETBITMAPSIZE        = $WM_USER + 32
2135 TB_AUTOSIZE             = $WM_USER + 33
2136 TB_GETTOOLTIPS          = $WM_USER + 35
2137 TB_SETTOOLTIPS          = $WM_USER + 36
2138 TB_SETPARENT            = $WM_USER + 37
2139 TB_SETROWS              = $WM_USER + 39
2140 TB_GETROWS              = $WM_USER + 40
2141 TB_SETCMDID             = $WM_USER + 42
2142 TB_CHANGEBITMAP         = $WM_USER + 43
2143 TB_GETBITMAP            = $WM_USER + 44
2144 TB_GETBUTTONTEXTW       = $WM_USER + 75
2145 TB_REPLACEBITMAP        = $WM_USER + 46
2146 TB_SETINDENT            = $WM_USER + 47
2147 TB_SETIMAGELIST         = $WM_USER + 48
2148 TB_GETIMAGELIST         = $WM_USER + 49
2149 TB_LOADIMAGES           = $WM_USER + 50
2150 TB_GETRECT              = $WM_USER + 51
2151 TB_SETHOTIMAGELIST      = $WM_USER + 52
2152 TB_GETHOTIMAGELIST      = $WM_USER + 53
2153 TB_SETDISABLEDIMAGELIST = $WM_USER + 54
2154 TB_GETDISABLEDIMAGELIST = $WM_USER + 55
2155 TB_SETSTYLE             = $WM_USER + 56
2156 TB_GETSTYLE             = $WM_USER + 57
2157 TB_GETBUTTONSIZE        = $WM_USER + 58
2158 TB_SETBUTTONWIDTH       = $WM_USER + 59
2159 TB_SETMAXTEXTROWS       = $WM_USER + 60
2160 TB_GETTEXTROWS          = $WM_USER + 61
2161 TB_GETOBJECT            = $WM_USER + 62
2162 TB_SETBUTTONINFO        = $WM_USER + 64
2163 TB_GETHOTITEM           = $WM_USER + 71
2164 TB_SETHOTITEM           = $WM_USER + 72
2165 TB_SETANCHORHIGHLIGHT   = $WM_USER + 73
2166 TB_GETANCHORHIGHLIGHT   = $WM_USER + 74
2167 TB_MAPACCELERATOR       = $WM_USER + 90
2168 TB_GETINSERTMARK        = $WM_USER + 79
2169 TB_SETINSERTMARK        = $WM_USER + 80
2170 TB_INSERTMARKHITTEST    = $WM_USER + 81
2171 TB_MOVEBUTTON           = $WM_USER + 82
2172 TB_GETMAXSIZE           = $WM_USER + 83
2173 TB_SETEXTENDEDSTYLE     = $WM_USER + 84
2174 TB_GETEXTENDEDSTYLE     = $WM_USER + 85
2175 TB_GETPADDING           = $WM_USER + 86
2176 TB_SETPADDING           = $WM_USER + 87
2177 TB_SETINSERTMARKCOLOR   = $WM_USER + 88
2178 TB_GETINSERTMARKCOLOR   = $WM_USER + 89
2179 
2180 TBSTATE_CHECKED         = 0x01
2181 TBSTATE_PRESSED         = 0x02
2182 TBSTATE_ENABLED         = 0x04
2183 TBSTATE_HIDDEN          = 0x08
2184 TBSTATE_INDETERMINATE   = 0x10
2185 TBSTATE_WRAP            = 0x20
2186 TBSTATE_ELLIPSES        = 0x40
2187 TBSTATE_MARKED          = 0x80
2188 
2189 TBSTYLE_BUTTON          = 0x0000  // obsolete use BTN
2190 TBSTYLE_SEP             = 0x0001  // obsolete use BTN
2191 TBSTYLE_CHECK           = 0x0002  // obsolete use BTN
2192 TBSTYLE_GROUP           = 0x0004  // obsolete use BTN
2193 //TBSTYLE_CHECKGROUP      (TBSTYLE_GROUP | TBSTYLE_CHE
2194 TBSTYLE_DROPDOWN        = 0x0008  // obsolete use BTN
2195 TBSTYLE_AUTOSIZE        = 0x0010  // obsolete use BTN
2196 TBSTYLE_NOPREFIX        = 0x0020  // obsolete use BTN
2197 
2198 
2199 TBSTYLE_TOOLTIPS        = 0x0100
2200 TBSTYLE_WRAPABLE        = 0x0200
2201 TBSTYLE_ALTDRAG         = 0x0400
2202 TBSTYLE_FLAT            = 0x0800
2203 TBSTYLE_LIST            = 0x1000
2204 TBSTYLE_CUSTOMERASE     = 0x2000
2205 
2206 TBSTYLE_REGISTERDROP    = 0x4000
2207 TBSTYLE_TRANSPARENT     = 0x8000
2208 TBSTYLE_EX_DRAWDDARROWS = 0x00000001
2209 
2210 
2211 BTNS_SHOWTEXT   = 0x0040              // ignored unles
2212 BTNS_WHOLEDROPDOWN  = 0x0080          // draw drop-dow
2213 TBSTYLE_EX_MIXEDBUTTONS             = 0x00000008
2214 TBSTYLE_EX_HIDECLIPPEDBUTTONS       = 0x00000010  // d
2215 
2216 TBSTYLE_EX_DOUBLEBUFFER             = 0x00000080 // Do
2217 
2218 TBIF_IMAGE              = 0x00000001
2219 TBIF_TEXT               = 0x00000002
2220 TBIF_STATE              = 0x00000004
2221 TBIF_STYLE              = 0x00000008
2222 TBIF_LPARAM             = 0x00000010
2223 TBIF_COMMAND            = 0x00000020
2224 TBIF_SIZE               = 0x00000040
2225 TBIF_BYINDEX            = 0x80000000
2226 
2227 
2228 NM_OUTOFMEMORY          = -1
2229 NM_CLICK                = -2 
2230 NM_DBLCLK               = -3
2231 NM_RETURN               = -4
2232 NM_RCLICK               = -5 
2233 NM_RDBLCLK              = -6
2234 NM_SETFOCUS             = -7
2235 NM_KILLFOCUS            = -8
2236 NM_CUSTOMDRAW           = -12
2237 NM_HOVER                = -13
2238 NM_NCHITTEST            = -14
2239 NM_KEYDOWN              = -15
2240 NM_RELEASEDCAPTURE      = -16
2241 NM_SETCURSOR            = -17
2242 NM_CHAR                 = -18
2243 NM_LDOWN                = -20
2244 NM_RDOWN                = -21
2245 NM_THEMECHANGED         = -22
2246 
2247 
2248 
2249 TBN_FIRST               = -700
2250 TBN_GETBUTTONINFOW      = $TBN_FIRST - 20
2251 TBN_BEGINDRAG           = $TBN_FIRST - 1 
2252 TBN_ENDDRAG             = $TBN_FIRST - 2
2253 TBN_BEGINADJUST         = $TBN_FIRST - 3
2254 TBN_ENDADJUST           = $TBN_FIRST - 4
2255 TBN_RESET               = $TBN_FIRST - 5
2256 TBN_QUERYINSERT         = $TBN_FIRST - 6
2257 TBN_QUERYDELETE         = $TBN_FIRST - 7
2258 TBN_TOOLBARCHANGE       = $TBN_FIRST - 8
2259 TBN_CUSTHELP            = $TBN_FIRST - 9
2260 TBN_DROPDOWN            = $TBN_FIRST - 10
2261 TBN_GETOBJECT           = $TBN_FIRST - 12
2262 TBN_HOTITEMCHANGE       = $TBN_FIRST - 13
2263 TBN_DRAGOUT             = $TBN_FIRST - 14
2264 TBN_DELETINGBUTTON      = $TBN_FIRST - 15
2265 TBN_GETDISPINFOW        = $TBN_FIRST - 17
2266 TBN_GETINFOTIPW         = $TBN_FIRST - 19
2267 }
2268 
2269 //ToolTip
2270 type TOOLINFO{
2271     uint      cbSize 
2272     uint      uFlags 
2273     uint      hwnd 
2274     uint      uId 
2275     RECT      rect 
2276     uint      hinst 
2277     uint      lpszText
2278     uint      lParam
2279 } 
2280 
2281 type NMTTDISPINFO {
2282     NMHDR      hdr
2283     uint       lpszText
2284     reserved   szText[ 80 * 2 ]
2285     uint       hinst
2286     uint       uFlags
2287     uint       lParam
2288 }
2289 
2290 define {
2291 TTM_ACTIVATE            = $WM_USER + 1
2292 TTM_SETDELAYTIME        = $WM_USER + 3
2293 TTM_ADDTOOL             = $WM_USER + 50
2294 TTM_DELTOOL             = $WM_USER + 51
2295 TTM_NEWTOOLRECT         = $WM_USER + 52
2296 TTM_RELAYEVENT          = $WM_USER + 7
2297 TTM_GETTOOLINFO         = $WM_USER + 53
2298 TTM_SETTOOLINFO         = $WM_USER + 54
2299 TTM_HITTEST             = $WM_USER +55
2300 TTM_GETTEXT             = $WM_USER +56
2301 TTM_UPDATETIPTEXT       = $WM_USER +57
2302 TTM_GETTOOLCOUNT        = $WM_USER +13
2303 TTM_ENUMTOOLS           = $WM_USER +58
2304 TTM_GETCURRENTTOOL      = $WM_USER + 59
2305 TTM_WINDOWFROMPOINT     = $WM_USER + 16
2306 TTM_TRACKACTIVATE       = $WM_USER + 17
2307 TTM_TRACKPOSITION       = $WM_USER + 18
2308 TTM_SETTIPBKCOLOR       = $WM_USER + 19
2309 TTM_SETTIPTEXTCOLOR     = $WM_USER + 20
2310 TTM_GETDELAYTIME        = $WM_USER + 21
2311 TTM_GETTIPBKCOLOR       = $WM_USER + 22
2312 TTM_GETTIPTEXTCOLOR     = $WM_USER + 23
2313 TTM_SETMAXTIPWIDTH      = $WM_USER + 24
2314 TTM_GETMAXTIPWIDTH      = $WM_USER + 25
2315 TTM_SETMARGIN           = $WM_USER + 26
2316 TTM_GETMARGIN           = $WM_USER + 27
2317 TTM_POP                 = $WM_USER + 28
2318 TTM_UPDATE              = $WM_USER + 29
2319 TTM_GETBUBBLESIZE       = $WM_USER + 30
2320 TTM_ADJUSTRECT          = $WM_USER + 31
2321 TTM_SETTITLE            = $WM_USER + 33
2322 TTM_POPUP               = $WM_USER + 34
2323 TTM_GETTITLE            = $WM_USER + 35
2324 
2325 TTF_IDISHWND            = 0x0001
2326 TTF_CENTERTIP           = 0x0002
2327 TTF_RTLREADING          = 0x0004
2328 TTF_SUBCLASS            = 0x0010
2329 TTF_TRACK               = 0x0020
2330 TTF_ABSOLUTE            = 0x0080
2331 TTF_TRANSPARENT         = 0x0100
2332 TTF_PARSELINKS          = 0x1000
2333 TTF_DI_SETITEM          = 0x8000
2334 
2335 
2336 TTN_FIRST               =-520
2337 TTN_GETDISPINFO         = $TTN_FIRST - 10
2338 TTN_SHOW                = $TTN_FIRST - 1
2339 TTN_POP                 = $TTN_FIRST - 2
2340 TTN_LINKCLICK           = $TTN_FIRST - 3
2341 }
2342 
2343 type NMHEADER {
2344     NMHDR hdr
2345     int iItem
2346     int iButton
2347     uint pitem
2348 }
2349 
2350 type HD_HITTESTINFO {
2351     POINT pt
2352     uint flags
2353     int iItem
2354 }
2355 
2356 type HDITEM {
2357     uint    mask 
2358     int     cxy 
2359     uint    pszText 
2360     uint    hbm 
2361     int     cchTextMax 
2362     int     fmt 
2363     uint    lParam 
2364     int     iImage
2365     int     iOrder    
2366 } 
2367 
2368 define {
2369 HDN_FIRST               = -300
2370 HDN_ITEMCHANGINGW       = $HDN_FIRST - 20 
2371 HDN_ITEMCHANGEDW        = $HDN_FIRST - 21 
2372 HDN_ITEMCLICKW          = $HDN_FIRST - 22 
2373 HDN_ITEMDBLCLICKW       = $HDN_FIRST - 23 
2374 HDN_DIVIDERDBLCLICKW    = $HDN_FIRST - 25 
2375 HDN_BEGINTRACKW         = $HDN_FIRST - 26 
2376 HDN_ENDTRACKW           = $HDN_FIRST - 27 
2377 HDN_TRACKW              = $HDN_FIRST - 28 
2378 HDN_GETDISPINFOW        = $HDN_FIRST - 29
2379 HDN_BEGINDRAG           = $HDN_FIRST - 10
2380 HDN_ENDDRAG             = $HDN_FIRST - 11
2381 HDN_FILTERCHANGE        = $HDN_FIRST - 12
2382 HDN_FILTERBTNCLICK      = $HDN_FIRST - 13
2383 
2384 HDM_FIRST    = 0x1200
2385 HDM_HITTEST  = $HDM_FIRST + 6 
2386 HDM_GETITEMW = $HDM_FIRST + 11
2387 
2388 HDF_SORTUP    =   0x0400
2389 HDF_SORTDOWN  =   0x0200
2390 
2391 }
2392 
2393 define {
2394 CDRF_DODEFAULT        =  0x00000000
2395 CDRF_NEWFONT          =  0x00000002
2396 CDRF_SKIPDEFAULT      =  0x00000004
2397 CDRF_NOTIFYPOSTPAINT  =  0x00000010
2398 CDRF_NOTIFYITEMDRAW   =  0x00000020
2399 CDRF_NOTIFYPOSTERASE  =  0x00000040
2400 
2401 CDRF_NOTIFYSUBITEMDRAW  = 0x00000020
2402 
2403 CDDS_PREPAINT        = 0x00000001
2404 CDDS_POSTPAINT       = 0x00000002
2405 CDDS_PREERASE        = 0x00000003
2406 CDDS_POSTERASE       = 0x00000004
2407 CDDS_ITEM            = 0x00010000
2408 CDDS_ITEMPREPAINT    = ($CDDS_ITEM | $CDDS_PREPAINT)
2409 CDDS_ITEMPOSTPAINT   = ($CDDS_ITEM | $CDDS_POSTPAINT)
2410 CDDS_ITEMPREERASE    = ($CDDS_ITEM | $CDDS_PREERASE)
2411 CDDS_ITEMPOSTERASE   = ($CDDS_ITEM | $CDDS_POSTERASE)
2412 CDDS_SUBITEM         = 0x00020000
2413 
2414 CDIS_SELECTED       = 0x0001
2415 CDIS_GRAYED         = 0x0002
2416 CDIS_DISABLED       = 0x0004
2417 CDIS_CHECKED        = 0x0008
2418 CDIS_FOCUS          = 0x0010
2419 
2420 }
2421 
2422 type NMCUSTOMDRAW {
2423     NMHDR hdr
2424     uint dwDrawStage
2425     uint hdc
2426     RECT rc
2427     uint dwItemSpec
2428     uint uItemState
2429     uint lItemlParam
2430 } 
2431 
2432 type NMTVCUSTOMDRAW {
2433     NMCUSTOMDRAW nmcd
2434     uint clrText
2435     uint clrTextBk
2436 } 
2437 
2438 type NMLVCUSTOMDRAW {
2439     NMCUSTOMDRAW nmcd
2440     uint clrText
2441     uint clrTextBk
2442     int iSubItem
2443 }
2444 
2445 
2446 
2447 //DateTimePicker
2448 define {
2449 DTS_UPDOWN          = 0x0001 
2450 DTS_SHOWNONE        = 0x0002 
2451 DTS_SHORTDATEFORMAT = 0x0000 
2452 DTS_LONGDATEFORMAT  = 0x0004 
2453 DTS_SHORTDATECENTURYFORMAT = 0x000C
2454 DTS_TIMEFORMAT      = 0x0009 
2455 DTS_APPCANPARSE     = 0x0010 
2456 DTS_RIGHTALIGN      = 0x0020
2457 
2458 DTN_FIRST           = -760
2459 DTN_DATETIMECHANGE  = $DTN_FIRST + 1  
2460 
2461 DTM_FIRST           = 0x1000
2462 DTM_GETSYSTEMTIME   = $DTM_FIRST + 1
2463 DTM_SETSYSTEMTIME   = $DTM_FIRST + 2
2464 DTM_GETRANGE        = $DTM_FIRST + 3
2465 DTM_SETRANGE        = $DTM_FIRST + 4
2466 DTM_SETFORMATW      = $DTM_FIRST + 50
2467 
2468 
2469 }
2470 
2471 //ProgressBar
2472 define {
2473 PBS_SMOOTH          = 0x01
2474 PBS_VERTICAL        = 0x04
2475 
2476 PBM_SETRANGE     =  ($WM_USER+1)
2477 PBM_SETPOS       =  ($WM_USER+2)
2478 PBM_DELTAPOS     =  ($WM_USER+3)
2479 PBM_SETSTEP      =  ($WM_USER+4)
2480 PBM_STEPIT       =  ($WM_USER+5)
2481 PBM_SETRANGE32   =  ($WM_USER+6)
2482 }
Редактировать