1 /** 2 * Windows API header module 3 * 4 * Translated from MinGW API for MS-Windows 3.12 5 * 6 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) 7 * Source: $(DRUNTIMESRC core/sys/windows/_commctrl.d) 8 */ 9 module core.sys.windows.commctrl; 10 version (Windows): 11 12 version (ANSI) {} else version = Unicode; 13 pragma(lib, "comctl32"); 14 15 import core.sys.windows.w32api, core.sys.windows.windef, core.sys.windows.winuser; 16 import core.sys.windows.winbase; // for SYSTEMTIME 17 import core.sys.windows.objfwd; // for LPSTREAM 18 19 import core.sys.windows.prsht; 20 21 enum COMCTL32_VERSION = 6; 22 23 const TCHAR[] 24 DRAGLISTMSGSTRING = "commctrl_DragListMsg", 25 HOTKEY_CLASS = "msctls_hotkey32", 26 PROGRESS_CLASS = "msctls_progress32", 27 STATUSCLASSNAME = "msctls_statusbar32", 28 TOOLBARCLASSNAME = "ToolbarWindow32", 29 TOOLTIPS_CLASS = "tooltips_class32", 30 TRACKBAR_CLASS = "msctls_trackbar32", 31 UPDOWN_CLASS = "msctls_updown32", 32 ANIMATE_CLASS = "SysAnimate32", 33 DATETIMEPICK_CLASS = "SysDateTimePick32", 34 MONTHCAL_CLASS = "SysMonthCal32", 35 REBARCLASSNAME = "ReBarWindow32", 36 WC_COMBOBOXEX = "ComboBoxEx32", 37 WC_IPADDRESS = "SysIPAddress32", 38 WC_LISTVIEW = "SysListView32", 39 WC_TABCONTROL = "SysTabControl32", 40 WC_TREEVIEW = "SysTreeView32", 41 WC_HEADER = "SysHeader32", 42 WC_PAGESCROLLER = "SysPager", 43 WC_NATIVEFONTCTL = "NativeFontCtl", 44 WC_BUTTON = "Button", 45 WC_STATIC = "Static", 46 WC_EDIT = "Edit", 47 WC_LISTBOX = "ListBox", 48 WC_COMBOBOX = "ComboBox", 49 WC_SCROLLBAR = "ScrollBar", 50 WC_LINKA = "SysLink"; 51 52 enum { 53 LVM_FIRST = 0x1000, 54 TV_FIRST = 0x1100, 55 HDM_FIRST = 0x1200 56 } 57 58 enum { 59 ACM_OPENA = WM_USER + 100, 60 ACM_PLAY = WM_USER + 101, 61 ACM_STOP = WM_USER + 102, 62 ACM_OPENW = WM_USER + 103, 63 ACM_ISPLAYING = WM_USER + 104 64 } 65 66 enum { 67 ACN_START = 1, 68 ACN_STOP 69 } 70 71 enum { 72 CBEIF_TEXT = 0x00000001, 73 CBEIF_IMAGE = 0x00000002, 74 CBEIF_SELECTEDIMAGE = 0x00000004, 75 CBEIF_OVERLAY = 0x00000008, 76 CBEIF_INDENT = 0x00000010, 77 CBEIF_LPARAM = 0x00000020, 78 CBEIF_DI_SETITEM = 0x10000000 79 } 80 81 enum { 82 RBN_FIRST = -831U, 83 RBN_LAST = -859U, 84 MCN_FIRST = -750U, 85 MCN_LAST = -759U, 86 DTN_FIRST = -760U, 87 DTN_LAST = -799U, 88 CBEN_FIRST = -800U, 89 CBEN_LAST = -830U 90 } 91 92 enum { 93 CBEN_INSERTITEM = CBEN_FIRST - 1, 94 CBEN_DELETEITEM = CBEN_FIRST - 2, 95 CBEN_BEGINEDIT = CBEN_FIRST - 4, 96 CBEN_ENDEDITA = CBEN_FIRST - 5, 97 CBEN_ENDEDITW = CBEN_FIRST - 6 98 } 99 100 enum { 101 CBENF_KILLFOCUS = 1, 102 CBENF_RETURN, 103 CBENF_ESCAPE, 104 CBENF_DROPDOWN // = 4 105 } 106 107 enum CBEMAXSTRLEN = 260; 108 109 enum { 110 DL_BEGINDRAG = 1157, 111 DL_CANCELDRAG = 1160, 112 DL_DRAGGING = 1158, 113 DL_DROPPED = 1159, 114 DL_CURSORSET = 0, 115 DL_STOPCURSOR = 1, 116 DL_COPYCURSOR = 2, 117 DL_MOVECURSOR = 3 118 } 119 120 enum { 121 CCS_TOP = 1, 122 CCS_NOMOVEY = 2, 123 CCS_BOTTOM = 3, 124 CCS_NORESIZE = 4, 125 CCS_NOPARENTALIGN = 8, 126 CCS_ADJUSTABLE = 32, 127 CCS_NODIVIDER = 64 128 } 129 static if (_WIN32_IE >= 0x300) { 130 enum { 131 CCS_VERT = 128, 132 CCS_LEFT = 129, 133 CCS_NOMOVEX = 130, 134 CCS_RIGHT = 131 135 } 136 } 137 138 enum { 139 ACS_CENTER = 0x0001, 140 ACS_TRANSPARENT = 0x0002, 141 ACS_AUTOPLAY = 0x0004, 142 ACS_TIMER = 0x0008 143 } 144 145 enum { 146 PGS_VERT = 0x00000000, 147 PGS_HORZ = 0x00000001, 148 PGS_AUTOSCROLL = 0x00000002, 149 PGS_DRAGNDROP = 0x00000004 150 } 151 152 enum CMB_MASKED = 2; 153 154 enum MINSYSCOMMAND = SC_SIZE; 155 156 enum { 157 SBT_OWNERDRAW = 0x1000, 158 SBT_NOBORDERS = 256, 159 SBT_POPOUT = 512, 160 SBT_RTLREADING = 1024 161 } 162 163 enum { 164 SB_SETTEXTA = WM_USER + 1, 165 SB_SETTEXTW = WM_USER + 11, 166 SB_GETTEXTA = WM_USER + 2, 167 SB_GETTEXTW = WM_USER + 13, 168 SB_GETTEXTLENGTHA = WM_USER + 3, 169 SB_GETTEXTLENGTHW = WM_USER + 12, 170 SB_SETPARTS = WM_USER + 4, 171 SB_GETPARTS = WM_USER + 6, 172 SB_GETBORDERS = WM_USER + 7, 173 SB_SETMINHEIGHT = WM_USER + 8, 174 SB_SIMPLE = WM_USER + 9, 175 SB_GETRECT = WM_USER + 10 176 } 177 178 enum { 179 MSGF_COMMCTRL_BEGINDRAG = 0x4200, 180 MSGF_COMMCTRL_SIZEHEADER = 0x4201, 181 MSGF_COMMCTRL_DRAGSELECT = 0x4202, 182 MSGF_COMMCTRL_TOOLBARCUST = 0x4203 183 } 184 185 enum { 186 ILC_COLOR = 0, 187 ILC_COLOR4 = 4, 188 ILC_COLOR8 = 8, 189 ILC_COLOR16 = 16, 190 ILC_COLOR24 = 24, 191 ILC_COLOR32 = 32, 192 ILC_COLORDDB = 254, 193 ILC_MASK = 1, 194 ILC_PALETTE = 2048 195 } 196 197 enum { 198 ILCF_MOVE, 199 ILCF_SWAP 200 } 201 202 enum { 203 ILS_NORMAL = 0, 204 ILS_GLOW = 1, 205 ILS_SHADOW = 2, 206 ILS_SATURATE = 4, 207 ILS_ALPHA = 8, 208 ILD_BLEND25 = 2, 209 ILD_BLEND50 = 4, 210 ILD_SELECTED = 4, 211 ILD_BLEND = 4, 212 ILD_FOCUS = 2, 213 ILD_MASK = 16, 214 ILD_NORMAL = 0, 215 ILD_TRANSPARENT = 1, 216 ILD_IMAGE = 0x0020, 217 ILD_ROP = 0x0040, 218 ILD_OVERLAYMASK = 0x0F00, 219 ILD_PRESERVEALPHA = 0x1000, 220 ILD_SCALE = 0x2000, 221 ILD_DPISCALE = 0x4000 222 } 223 224 enum { 225 HDS_HORZ = 0, 226 HDS_BUTTONS = 2, 227 HDS_HIDDEN = 8 228 } 229 static if (_WIN32_IE >= 0x400) { 230 enum { 231 HDS_HOTTRACK = 4, 232 HDS_DRAGDROP = 0x0040, 233 HDS_FULLDRAG = 0x0080 234 } 235 } 236 static if (_WIN32_IE >= 0x500) { 237 enum { 238 HDS_FILTERBAR = 0x0100 239 } 240 } 241 242 enum { 243 NM_FIRST = 0, 244 NM_LAST = -99U, 245 LVN_FIRST = -100U, 246 LVN_LAST = -199U, 247 HDN_FIRST = -300U, 248 HDN_LAST = -399U, 249 TVN_FIRST = -400U, 250 TVN_LAST = -499U, 251 TTN_FIRST = -520U, 252 TTN_LAST = -549U, 253 TCN_FIRST = -550U, 254 TCN_LAST = -580U, 255 CDN_FIRST = -601U, /* also in commdlg.h */ 256 CDN_LAST = -699U, 257 TBN_FIRST = -700U, 258 TBN_LAST = -720U, 259 UDN_FIRST = -721U, 260 UDN_LAST = -740U 261 } 262 /*static if (_WIN32_IE >= 0x300) { 263 enum { 264 RBN_FIRST = -831U, 265 RBN_LAST = -859U, 266 MCN_FIRST = -750U, 267 MCN_LAST = -759U, 268 DTN_FIRST = -760U, 269 DTN_LAST = -799U, 270 CBEN_FIRST = -800U, 271 CBEN_LAST = -830U 272 } 273 }*/ 274 static if (_WIN32_IE >= 0x400) { 275 enum { 276 IPN_FIRST = -860U, 277 IPN_LAST = -879U, 278 IPN_FIELDCHANGED = IPN_FIRST, 279 SBN_FIRST = -880U, 280 SBN_LAST = -899U, 281 PGN_FIRST = -900U, 282 PGN_LAST = -950U, 283 PGN_SCROLL = PGN_FIRST-1, 284 PGN_CALCSIZE = PGN_FIRST-2 285 } 286 } 287 288 static if (_WIN32_IE >= 0x500) { 289 enum { 290 WMN_FIRST = -1000U, 291 WMN_LAST = -1200U, 292 } 293 } 294 295 static if (_WIN32_WINNT >= 0x501) 296 { 297 enum { 298 BCN_FIRST = -1250U, 299 BCN_LAST = -1350U, 300 } 301 } 302 303 static if (_WIN32_WINNT >= 0x600) 304 { 305 enum { 306 TRBN_FIRST = -1501U, 307 TRBN_LAST = -1519U, 308 } 309 } 310 311 enum { 312 HDI_WIDTH = 1, 313 HDI_HEIGHT = 1, 314 HDI_TEXT = 2, 315 HDI_FORMAT = 4, 316 HDI_LPARAM = 8, 317 HDI_BITMAP = 16 318 } 319 static if (_WIN32_IE >= 0x300) { 320 enum { 321 HDI_IMAGE = 32, 322 HDI_DI_SETITEM = 64, 323 HDI_ORDER = 128 324 } 325 } 326 static if (_WIN32_IE >= 0x500) { 327 enum { 328 HDI_FILTER = 256 329 } 330 } 331 332 enum { 333 CBES_EX_NOEDITIMAGE = 0x00000001, 334 CBES_EX_NOEDITIMAGEINDENT = 0x00000002, 335 CBES_EX_PATHWORDBREAKPROC = 0x00000004 336 } 337 static if (_WIN32_IE >= 0x400) { 338 enum { 339 CBES_EX_NOSIZELIMIT = 0x00000008, 340 CBES_EX_CASESENSITIVE = 0x00000010, 341 CBEN_GETDISPINFOA = CBEN_FIRST - 0, 342 CBEN_GETDISPINFOW = CBEN_FIRST - 7, 343 CBEN_DRAGBEGINA = CBEN_FIRST - 8, 344 CBEN_DRAGBEGINW = CBEN_FIRST - 9 345 } 346 } 347 348 enum { 349 HDF_LEFT, 350 HDF_RIGHT, 351 HDF_CENTER, 352 HDF_JUSTIFYMASK, 353 HDF_RTLREADING, // = 4 354 HDF_OWNERDRAW = 0x8000, 355 HDF_STRING = 0x4000, 356 HDF_BITMAP = 0x2000 357 } 358 static if (_WIN32_IE >= 0x300) { 359 enum { 360 HDF_BITMAP_ON_RIGHT = 0x1000, 361 HDF_IMAGE = 0x0800 362 } 363 } 364 365 enum { 366 CCM_FIRST = 0x2000, 367 CCM_LAST = CCM_FIRST + 0x200, 368 CCM_SETBKCOLOR = 8193, 369 CCM_SETCOLORSCHEME = 8194, 370 CCM_GETCOLORSCHEME = 8195, 371 CCM_GETDROPTARGET = 8196, 372 CCM_SETUNICODEFORMAT = 8197, 373 CCM_GETUNICODEFORMAT = 8198, 374 CCM_SETVERSION = 0x2007, 375 CCM_GETVERSION = 0x2008, 376 CCM_SETNOTIFYWINDOW = 0x2009 377 } 378 379 enum { 380 HDM_GETITEMCOUNT = HDM_FIRST, 381 HDM_INSERTITEMA = HDM_FIRST + 1, 382 HDM_INSERTITEMW = HDM_FIRST + 10, 383 HDM_DELETEITEM = HDM_FIRST + 2, 384 HDM_GETITEMA = HDM_FIRST + 3, 385 HDM_GETITEMW = HDM_FIRST + 11, 386 HDM_SETITEMA = HDM_FIRST + 4, 387 HDM_SETITEMW = HDM_FIRST + 12, 388 HDM_LAYOUT = HDM_FIRST + 5 389 } 390 static if (_WIN32_IE >= 0x300) { 391 enum { 392 HDM_GETITEMRECT = HDM_FIRST + 7, 393 HDM_SETIMAGELIST = HDM_FIRST + 8, 394 HDM_GETIMAGELIST = HDM_FIRST + 9, 395 HDM_ORDERTOINDEX = HDM_FIRST + 15, 396 HDM_CREATEDRAGIMAGE = HDM_FIRST + 16, 397 HDM_GETORDERARRAY = HDM_FIRST + 17, 398 HDM_SETORDERARRAY = HDM_FIRST + 18, 399 HDM_SETHOTDIVIDER = HDM_FIRST + 19 400 } 401 } 402 static if (_WIN32_IE >= 0x400) { 403 enum { 404 HDM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT, 405 HDM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT 406 } 407 } 408 static if (_WIN32_IE >= 0x500) { 409 enum { 410 HDM_SETBITMAPMARGIN = HDM_FIRST + 20, 411 HDM_GETBITMAPMARGIN = HDM_FIRST + 21, 412 HDM_SETFILTERCHANGETIMEOUT = HDM_FIRST + 22, 413 HDM_EDITFILTER = HDM_FIRST + 23, 414 HDM_CLEARFILTER = HDM_FIRST + 24, 415 } 416 } 417 static if (_WIN32_IE >= 0x600) { 418 enum { 419 HDM_GETITEMDROPDOWNRECT = HDM_FIRST + 25, 420 HDM_GETOVERFLOWRECT = HDM_FIRST + 26, 421 HDM_GETFOCUSEDITEM = HDM_FIRST + 27, 422 HDM_SETFOCUSEDITEM = HDM_FIRST + 28, 423 } 424 } 425 426 enum { 427 HHT_NOWHERE = 1, 428 HHT_ONHEADER = 2, 429 HHT_ONDIVIDER = 4, 430 HHT_ONDIVOPEN = 8, 431 HHT_ABOVE = 256, 432 HHT_BELOW = 512, 433 HHT_TORIGHT = 1024, 434 HHT_TOLEFT = 2048 435 } 436 437 enum { 438 HDM_HITTEST = HDM_FIRST + 6 439 } 440 441 enum { 442 HDN_ITEMCHANGINGA = HDN_FIRST -0, 443 HDN_ITEMCHANGINGW = HDN_FIRST -20, 444 HDN_ITEMCHANGEDA = HDN_FIRST -1, 445 HDN_ITEMCHANGEDW = HDN_FIRST -21, 446 HDN_ITEMCLICKA = HDN_FIRST -2, 447 HDN_ITEMCLICKW = HDN_FIRST -22, 448 HDN_ITEMDBLCLICKA = HDN_FIRST -3, 449 HDN_ITEMDBLCLICKW = HDN_FIRST -23, 450 HDN_DIVIDERDBLCLICKA = HDN_FIRST -5, 451 HDN_DIVIDERDBLCLICKW = HDN_FIRST -25, 452 HDN_BEGINTRACKA = HDN_FIRST -6, 453 HDN_BEGINTRACKW = HDN_FIRST -26, 454 HDN_ENDTRACKA = HDN_FIRST -7, 455 HDN_ENDTRACKW = HDN_FIRST -27, 456 HDN_TRACKA = HDN_FIRST -8, 457 HDN_TRACKW = HDN_FIRST -28 458 } 459 static if (_WIN32_IE >= 0x300) { 460 enum { 461 HDN_ENDDRAG = (HDN_FIRST-11), 462 HDN_BEGINDRAG = (HDN_FIRST-10), 463 HDN_GETDISPINFOA = (HDN_FIRST-9), 464 HDN_GETDISPINFOW = (HDN_FIRST-29) 465 } 466 } 467 468 static if (_WIN32_IE >= 0x400) { 469 enum { 470 HICF_OTHER = 0x00, 471 HICF_MOUSE = 0x01, 472 HICF_ARROWKEYS = 0x02, 473 HICF_ACCELERATOR = 0x04, 474 HICF_DUPACCEL = 0x08, 475 HICF_ENTERING = 0x10, 476 HICF_LEAVING = 0x20, 477 HICF_RESELECT = 0x40, 478 HICF_LMOUSE = 0x80, 479 HICF_TOGGLEDROPDOWN = 0x100 480 } 481 } 482 483 enum { 484 IPM_CLEARADDRESS = WM_USER + 100, 485 IPM_SETADDRESS = WM_USER + 101, 486 IPM_GETADDRESS = WM_USER + 102, 487 IPM_SETRANGE = WM_USER + 103, 488 IPM_SETFOCUS = WM_USER + 104, 489 IPM_ISBLANK = WM_USER + 105 490 } 491 492 static if (_WIN32_IE >= 0x500) { 493 enum { 494 I_INDENTCALLBACK = -1, 495 I_IMAGENONE = -2 496 } 497 } 498 499 enum { 500 TBSTATE_CHECKED = 1, 501 TBSTATE_PRESSED = 2, 502 TBSTATE_ENABLED = 4, 503 TBSTATE_HIDDEN = 8, 504 TBSTATE_INDETERMINATE = 16, 505 TBSTATE_WRAP = 32 506 } 507 static if (_WIN32_IE >= 0x300) { 508 enum { 509 TBSTATE_ELLIPSES = 0x40 510 } 511 } 512 static if (_WIN32_IE >= 0x400) { 513 enum { 514 TBSTATE_MARKED = 0x0080 515 } 516 } 517 518 enum { 519 TBSTYLE_BUTTON = 0, 520 TBSTYLE_SEP = 1, 521 TBSTYLE_CHECK = 2, 522 TBSTYLE_GROUP = 4, 523 TBSTYLE_CHECKGROUP = TBSTYLE_GROUP | TBSTYLE_CHECK 524 } 525 static if (_WIN32_IE >= 0x300) { 526 enum { 527 TBSTYLE_DROPDOWN = 8 528 } 529 } 530 static if (_WIN32_IE >= 0x400) { 531 enum { 532 TBSTYLE_AUTOSIZE = 16, 533 TBSTYLE_NOPREFIX = 32 534 } 535 } 536 enum { 537 TBSTYLE_TOOLTIPS = 256, 538 TBSTYLE_WRAPABLE = 512, 539 TBSTYLE_ALTDRAG = 1024 540 } 541 static if (_WIN32_IE >= 0x300) { 542 enum { 543 TBSTYLE_FLAT = 2048, 544 TBSTYLE_LIST = 4096, 545 TBSTYLE_CUSTOMERASE = 8192 546 } 547 } 548 static if (_WIN32_IE >= 0x400) { 549 enum { 550 TBSTYLE_REGISTERDROP = 0x4000, 551 TBSTYLE_TRANSPARENT = 0x8000, 552 TBSTYLE_EX_DRAWDDARROWS = 0x00000001 553 } 554 } 555 static if (_WIN32_IE >= 0x501) { 556 enum { 557 TBSTYLE_EX_MIXEDBUTTONS = 8, 558 TBSTYLE_EX_HIDECLIPPEDBUTTONS = 16 559 } 560 } 561 static if (_WIN32_WINNT >= 0x501) { 562 enum { 563 TBSTYLE_EX_DOUBLEBUFFER = 0x80 564 } 565 } 566 567 static if (_WIN32_IE >= 0x500) { 568 enum { 569 BTNS_BUTTON = TBSTYLE_BUTTON, 570 BTNS_SEP = TBSTYLE_SEP, 571 BTNS_CHECK = TBSTYLE_CHECK, 572 BTNS_GROUP = TBSTYLE_GROUP, 573 BTNS_CHECKGROUP = TBSTYLE_CHECKGROUP, 574 BTNS_DROPDOWN = TBSTYLE_DROPDOWN, 575 BTNS_AUTOSIZE = TBSTYLE_AUTOSIZE, 576 BTNS_NOPREFIX = TBSTYLE_NOPREFIX, 577 BTNS_WHOLEDROPDOWN = 0x0080 578 } 579 } 580 static if (_WIN32_IE >= 0x501) { 581 enum { 582 BTNS_SHOWTEXT = 0x0040 583 } 584 } 585 586 static if (_WIN32_IE >= 0x400) { 587 enum { 588 TBCDRF_NOEDGES = 0x10000, 589 TBCDRF_HILITEHOTTRACK = 0x20000, 590 TBCDRF_NOOFFSET = 0x40000, 591 TBCDRF_NOMARK = 0x80000, 592 TBCDRF_NOETCHEDEFFECT = 0x100000 593 } 594 } 595 596 enum HINST_COMMCTRL = cast(HINSTANCE) (-1); 597 598 enum { 599 IDB_STD_SMALL_COLOR, 600 IDB_STD_LARGE_COLOR, 601 IDB_VIEW_SMALL_COLOR = 4, 602 IDB_VIEW_LARGE_COLOR = 5 603 } 604 static if (_WIN32_IE >= 0x300) { 605 enum { 606 IDB_HIST_SMALL_COLOR = 8, 607 IDB_HIST_LARGE_COLOR = 9 608 } 609 } 610 611 enum { 612 STD_CUT, 613 STD_COPY, 614 STD_PASTE, 615 STD_UNDO, 616 STD_REDOW, 617 STD_DELETE, 618 STD_FILENEW, 619 STD_FILEOPEN, 620 STD_FILESAVE, 621 STD_PRINTPRE, 622 STD_PROPERTIES, 623 STD_HELP, 624 STD_FIND, 625 STD_REPLACE, 626 STD_PRINT // = 14 627 } 628 629 enum { 630 VIEW_LARGEICONS, 631 VIEW_SMALLICONS, 632 VIEW_LIST, 633 VIEW_DETAILS, 634 VIEW_SORTNAME, 635 VIEW_SORTSIZE, 636 VIEW_SORTDATE, 637 VIEW_SORTTYPE, 638 VIEW_PARENTFOLDER, 639 VIEW_NETCONNECT, 640 VIEW_NETDISCONNECT, 641 VIEW_NEWFOLDER // = 11 642 } 643 644 enum { 645 TB_ENABLEBUTTON = WM_USER + 1, 646 TB_CHECKBUTTON, 647 TB_PRESSBUTTON, 648 TB_HIDEBUTTON, 649 TB_INDETERMINATE, // = WM_USER + 5, 650 TB_ISBUTTONENABLED = WM_USER + 9, 651 TB_ISBUTTONCHECKED, 652 TB_ISBUTTONPRESSED, 653 TB_ISBUTTONHIDDEN, 654 TB_ISBUTTONINDETERMINATE, // = WM_USER + 13, 655 TB_SETSTATE = WM_USER + 17, 656 TB_GETSTATE = WM_USER + 18, 657 TB_ADDBITMAP = WM_USER + 19, 658 TB_DELETEBUTTON = WM_USER + 22, 659 TB_GETBUTTON, 660 TB_BUTTONCOUNT, 661 TB_COMMANDTOINDEX, 662 TB_SAVERESTOREA, 663 TB_CUSTOMIZE, 664 TB_ADDSTRINGA, 665 TB_GETITEMRECT, 666 TB_BUTTONSTRUCTSIZE, 667 TB_SETBUTTONSIZE, 668 TB_SETBITMAPSIZE, 669 TB_AUTOSIZE, // = WM_USER + 33, 670 TB_GETTOOLTIPS = WM_USER + 35, 671 TB_SETTOOLTIPS = WM_USER + 36, 672 TB_SETPARENT = WM_USER + 37, 673 TB_SETROWS = WM_USER + 39, 674 TB_GETROWS, 675 TB_GETBITMAPFLAGS, 676 TB_SETCMDID, 677 TB_CHANGEBITMAP, 678 TB_GETBITMAP, 679 TB_GETBUTTONTEXTA, 680 TB_REPLACEBITMAP, // = WM_USER + 46, 681 TB_GETBUTTONSIZE = WM_USER + 58, 682 TB_SETBUTTONWIDTH = WM_USER + 59, 683 TB_GETBUTTONTEXTW = WM_USER + 75, 684 TB_SAVERESTOREW = WM_USER + 76, 685 TB_ADDSTRINGW = WM_USER + 77, 686 } 687 static if (_WIN32_IE >= 0x400) { 688 enum { 689 TB_MARKBUTTON = WM_USER + 6 690 } 691 } 692 static if (_WIN32_IE >= 0x400) { 693 enum { 694 TB_ISBUTTONHIGHLIGHTED = WM_USER + 14 695 } 696 } 697 static if (_WIN32_IE >= 0x400) { 698 enum { 699 TB_ADDBUTTONSA = WM_USER + 20, 700 TB_INSERTBUTTONA = WM_USER + 21 701 } 702 } else { 703 enum { 704 TB_ADDBUTTONS = WM_USER + 20, 705 TB_INSERTBUTTON = WM_USER + 21 706 } 707 } 708 static if (_WIN32_IE >= 0x300) { 709 enum { 710 TB_SETINDENT = WM_USER + 47, 711 TB_SETIMAGELIST, 712 TB_GETIMAGELIST, 713 TB_LOADIMAGES, 714 TB_GETRECT, 715 TB_SETHOTIMAGELIST, 716 TB_GETHOTIMAGELIST, 717 TB_SETDISABLEDIMAGELIST, 718 TB_GETDISABLEDIMAGELIST, 719 TB_SETSTYLE, 720 TB_GETSTYLE, 721 //TB_GETBUTTONSIZE, 722 //TB_SETBUTTONWIDTH, 723 TB_SETMAXTEXTROWS, 724 TB_GETTEXTROWS // = WM_USER + 61 725 } 726 } 727 static if (_WIN32_IE >= 0x400) { 728 enum { 729 TB_GETOBJECT = WM_USER + 62, 730 TB_GETBUTTONINFOW, 731 TB_SETBUTTONINFOW, 732 TB_GETBUTTONINFOA, 733 TB_SETBUTTONINFOA, 734 TB_INSERTBUTTONW, 735 TB_ADDBUTTONSW, 736 TB_HITTEST, // = WM_USER + 69 737 TB_SETEXTENDEDSTYLE = WM_USER + 84, 738 TB_GETEXTENDEDSTYLE = WM_USER + 85, 739 TB_SETDRAWTEXTFLAGS = WM_USER + 70, 740 TB_GETHOTITEM, 741 TB_SETHOTITEM, 742 TB_SETANCHORHIGHLIGHT, 743 TB_GETANCHORHIGHLIGHT, // = WM_USER + 74 744 TB_MAPACCELERATORA = WM_USER + 78, 745 TB_GETINSERTMARK, 746 TB_SETINSERTMARK, 747 TB_INSERTMARKHITTEST, 748 TB_MOVEBUTTON, 749 TB_GETMAXSIZE, 750 //TB_SETEXTENDEDSTYLE, 751 //TB_GETEXTENDEDSTYLE, 752 TB_GETPADDING, 753 TB_SETPADDING, 754 TB_SETINSERTMARKCOLOR, 755 TB_GETINSERTMARKCOLOR, 756 TB_MAPACCELERATORW, 757 TB_GETSTRINGW, 758 TB_GETSTRINGA, // = WM_USER + 92 759 TB_SETHOTITEM2 = WM_USER + 94, 760 TB_SETLISTGAP = WM_USER + 96, 761 TB_GETIMAGELISTCOUNT = WM_USER + 98, 762 TB_GETIDEALSIZE = WM_USER + 99, 763 //TB_TRANSLATEACCELERATOR = CCM_TRANSLATEACCELERATOR, 764 TB_SETCOLORSCHEME = CCM_SETCOLORSCHEME, 765 TB_GETCOLORSCHEME = CCM_GETCOLORSCHEME, 766 TB_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT, 767 TB_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT 768 } 769 } 770 771 static if (_WIN32_WINNT >= 0x501) { 772 enum { 773 TB_GETMETRICS = WM_USER + 101, 774 TB_SETMETRICS = WM_USER + 102, 775 } 776 } 777 778 static if (_WIN32_WINNT >= 0x600) { 779 enum { 780 TB_GETITEMDROPDOWNRECT = WM_USER + 103, 781 TB_SETPRESSEDIMAGELIST = WM_USER + 104, 782 TB_GETPRESSEDIMAGELIST = WM_USER + 105, 783 } 784 } 785 786 enum TBBF_LARGE = 1; 787 788 enum { 789 TBN_GETBUTTONINFOA = TBN_FIRST -0, 790 TBN_BEGINDRAG = TBN_FIRST -1, 791 TBN_ENDDRAG = TBN_FIRST -2, 792 TBN_BEGINADJUST = TBN_FIRST -3, 793 TBN_ENDADJUST = TBN_FIRST -4, 794 TBN_RESET = TBN_FIRST -5, 795 TBN_QUERYINSERT = TBN_FIRST -6, 796 TBN_QUERYDELETE = TBN_FIRST -7, 797 TBN_TOOLBARCHANGE = TBN_FIRST -8, 798 TBN_CUSTHELP = TBN_FIRST -9 799 } 800 static if (_WIN32_IE >= 0x300) { 801 enum { 802 TBN_DROPDOWN = TBN_FIRST - 10 803 } 804 } 805 static if (_WIN32_IE >= 0x400) { 806 enum { 807 TBN_HOTITEMCHANGE = TBN_FIRST - 13, 808 TBN_DRAGOUT = TBN_FIRST - 14, 809 TBN_DELETINGBUTTON = TBN_FIRST - 15, 810 TBN_GETDISPINFOA = TBN_FIRST - 16, 811 TBN_GETDISPINFOW = TBN_FIRST - 17, 812 TBN_GETINFOTIPA = TBN_FIRST - 18, 813 TBN_GETINFOTIPW = TBN_FIRST - 19, 814 TBN_GETBUTTONINFOW = TBN_FIRST - 20 815 } 816 } 817 static if (_WIN32_IE >= 0x500) { 818 enum { 819 TBN_RESTORE = TBN_FIRST - 21, 820 TBN_SAVE = TBN_FIRST - 22, 821 TBN_INITCUSTOMIZE = TBN_FIRST - 23 822 } 823 824 enum { 825 TBNRF_HIDEHELP = 1, 826 TBNRF_ENDCUSTOMIZE 827 } 828 829 enum { 830 TBNF_IMAGE = 1, 831 TBNF_TEXT = 2, 832 TBNF_DI_SETITEM = 0x10000000 833 } 834 } 835 836 enum { 837 TTS_ALWAYSTIP = 1, 838 TTS_NOPREFIX 839 } 840 static if (_WIN32_IE >= 0x500) { 841 enum { 842 TTS_NOANIMATE = 0x10, 843 TTS_NOFADE = 0x20, 844 TTS_BALLOON = 0x40, 845 TTS_CLOSE = 0x80 846 } 847 } 848 849 enum { 850 TTF_IDISHWND = 1, 851 TTF_CENTERTIP = 2, 852 TTF_RTLREADING = 4, 853 TTF_SUBCLASS = 16 854 } 855 static if (_WIN32_IE >= 0x300) { 856 enum { 857 TTF_TRACK = 0x0020, 858 TTF_ABSOLUTE = 0x0080, 859 TTF_TRANSPARENT = 0x0100, 860 TTF_DI_SETITEM = 0x8000 861 } 862 863 static if (_WIN32_IE >= 0x501) { 864 enum { 865 TTF_PARSELINKS = 0x1000 866 } 867 } 868 869 enum { 870 TBCD_TICS = 1, 871 TBCD_THUMB, 872 TBCD_CHANNEL // = 3 873 } 874 } 875 876 static if (_WIN32_IE >= 0x400) { 877 enum { 878 TBDDRET_DEFAULT, 879 TBDDRET_NODEFAULT, 880 TBDDRET_TREATPRESSED 881 } 882 883 enum { 884 TBIMHT_AFTER = 1, 885 TBIMHT_BACKGROUND 886 } 887 } 888 889 enum { 890 TTDT_AUTOMATIC, 891 TTDT_RESHOW, 892 TTDT_AUTOPOP, 893 TTDT_INITIAL 894 } 895 896 enum { 897 TTM_ACTIVATE = WM_USER + 1, 898 TTM_SETDELAYTIME = WM_USER + 3, 899 TTM_ADDTOOLA, 900 TTM_DELTOOLA, 901 TTM_NEWTOOLRECTA, 902 TTM_RELAYEVENT, 903 TTM_GETTOOLINFOA, 904 TTM_SETTOOLINFOA, 905 TTM_HITTESTA, 906 TTM_GETTEXTA, 907 TTM_UPDATETIPTEXTA, 908 TTM_GETTOOLCOUNT, 909 TTM_ENUMTOOLSA, 910 TTM_GETCURRENTTOOLA, 911 TTM_WINDOWFROMPOINT, // = WM_USER + 16 912 TTM_ADDTOOLW = WM_USER + 50, 913 TTM_DELTOOLW, 914 TTM_NEWTOOLRECTW, 915 TTM_GETTOOLINFOW, 916 TTM_SETTOOLINFOW, 917 TTM_HITTESTW, 918 TTM_GETTEXTW, 919 TTM_UPDATETIPTEXTW, 920 TTM_ENUMTOOLSW, 921 TTM_GETCURRENTTOOLW // = WM_USER + 59 922 } 923 924 static if (_WIN32_IE >= 0x300) { 925 enum { 926 TTM_TRACKACTIVATE = WM_USER + 17, 927 TTM_TRACKPOSITION, 928 TTM_SETTIPBKCOLOR, 929 TTM_SETTIPTEXTCOLOR, 930 TTM_GETDELAYTIME, 931 TTM_GETTIPBKCOLOR, 932 TTM_GETTIPTEXTCOLOR, 933 TTM_SETMAXTIPWIDTH, 934 TTM_GETMAXTIPWIDTH, 935 TTM_SETMARGIN, 936 TTM_GETMARGIN, 937 TTM_POP // = WM_USER + 28 938 } 939 } 940 941 static if (_WIN32_IE >= 0x400) { // IE4.0 ??? 942 enum { 943 TTM_UPDATE = WM_USER + 29, 944 TTM_GETBUBBLESIZE, 945 TTM_ADJUSTRECT, 946 TTM_SETTITLEA, 947 TTM_SETTITLEW // = WM_USER + 33 948 } 949 static if (_WIN32_IE >= 0x500) { 950 alias TTM_SETTITLEW TTM_SETTITLE; 951 } else { 952 alias TTM_SETTITLEA TTM_SETTITLE; 953 } 954 } 955 956 static if (_WIN32_WINNT >= 0x501) { 957 enum { 958 TTM_POPUP = (WM_USER + 34), 959 TTM_GETTITLE = (WM_USER + 35), 960 } 961 } 962 963 enum { 964 TTN_GETDISPINFOA = TTN_FIRST - 0, 965 TTN_GETDISPINFOW = TTN_FIRST - 10, 966 TTN_NEEDTEXTA = TTN_GETDISPINFOA, 967 TTN_NEEDTEXTW = TTN_GETDISPINFOW, 968 TTN_SHOW = TTN_FIRST-1, 969 TTN_POP = TTN_FIRST-2 970 } 971 972 enum UD_MAXVAL = 0x7fff; 973 enum UD_MINVAL = -UD_MAXVAL; 974 975 enum { 976 UDN_DELTAPOS = UDN_FIRST-1, 977 UDS_WRAP = 1, 978 UDS_SETBUDDYINT = 2, 979 UDS_ALIGNRIGHT = 4, 980 UDS_ALIGNLEFT = 8, 981 UDS_AUTOBUDDY = 16, 982 UDS_ARROWKEYS = 32, 983 UDS_HORZ = 64, 984 UDS_NOTHOUSANDS = 128 985 } 986 987 static if (_WIN32_IE >= 0x300) { 988 enum { 989 UDS_HOTTRACK = 0x0100 990 } 991 } 992 993 enum { 994 UDM_SETRANGE = WM_USER + 101, 995 UDM_GETRANGE, 996 UDM_SETPOS, 997 UDM_GETPOS, 998 UDM_SETBUDDY, 999 UDM_GETBUDDY, 1000 UDM_SETACCEL, 1001 UDM_GETACCEL, 1002 UDM_SETBASE, 1003 UDM_GETBASE // = WM_USER + 110 1004 } 1005 1006 static if (_WIN32_IE >= 0x400) { 1007 enum { 1008 UDM_SETRANGE32 = WM_USER + 111, 1009 UDM_GETRANGE32, 1010 UDM_SETPOS32, 1011 UDM_GETPOS32 // = WM_USER + 114 1012 } 1013 } 1014 1015 static if (_WIN32_IE >= 0x500) { 1016 enum { 1017 UDM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT, 1018 UDM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT 1019 } 1020 } 1021 1022 /*enum { 1023 SB_SETTEXTA = WM_USER + 1, 1024 SB_GETTEXTA, 1025 SB_GETTEXTLENGTHA, 1026 SB_SETPARTS, // = WM_USER + 4 1027 SB_GETPARTS = WM_USER + 6, 1028 SB_GETBORDERS, 1029 SB_SETMINHEIGHT, 1030 SB_SIMPLE, 1031 SB_GETRECT, 1032 SB_SETTEXTW, 1033 SB_GETTEXTLENGTHW, 1034 SB_GETTEXTW // = WM_USER + 13 1035 }*/ 1036 1037 /*enum { 1038 SBT_OWNERDRAW = 0x1000, 1039 SBT_NOBORDERS = 256, 1040 SBT_POPOUT = 512, 1041 SBT_RTLREADING = 1024 1042 }*/ 1043 1044 static if (_WIN32_IE >= 0x400) { 1045 enum { 1046 SBT_TOOLTIPS = 0x0800, 1047 SBN_SIMPLEMODECHANGE = SBN_FIRST 1048 } 1049 } 1050 1051 enum { 1052 TBS_AUTOTICKS = 1, 1053 TBS_VERT = 2, 1054 TBS_HORZ = 0, 1055 TBS_TOP = 4, 1056 TBS_BOTTOM = 0, 1057 TBS_LEFT = 4, 1058 TBS_RIGHT = 0, 1059 TBS_BOTH = 8, 1060 TBS_NOTICKS = 16, 1061 TBS_ENABLESELRANGE = 32, 1062 TBS_FIXEDLENGTH = 64, 1063 TBS_NOTHUMB = 128 1064 } 1065 1066 static if (_WIN32_IE >= 0x300) { 1067 enum { 1068 TBS_TOOLTIPS = 0x0100, 1069 TBTS_TOP = 0, 1070 TBTS_LEFT, 1071 TBTS_BOTTOM, 1072 TBTS_RIGHT // = 3 1073 } 1074 } 1075 1076 static if (_WIN32_IE >= 0x500) { 1077 enum { 1078 TBS_REVERSED = 0x0200 1079 } 1080 } 1081 1082 static if (_WIN32_IE >= 0x501) { 1083 enum { 1084 TBS_DOWNISLEFT = 0x0400 1085 } 1086 } 1087 1088 static if (_WIN32_IE >= 0x400) { 1089 enum { 1090 TBIF_BYINDEX = 0x80000000, 1091 TBIF_COMMAND = 32, 1092 TBIF_IMAGE = 1, 1093 TBIF_LPARAM = 16, 1094 TBIF_SIZE = 64, 1095 TBIF_STATE = 4, 1096 TBIF_STYLE = 8, 1097 TBIF_TEXT = 2 1098 } 1099 } 1100 1101 enum { 1102 TBM_GETPOS = WM_USER, 1103 TBM_GETRANGEMIN, 1104 TBM_GETRANGEMAX, 1105 TBM_GETTIC, 1106 TBM_SETTIC, 1107 TBM_SETPOS, 1108 TBM_SETRANGE, 1109 TBM_SETRANGEMIN, 1110 TBM_SETRANGEMAX, 1111 TBM_CLEARTICS, 1112 TBM_SETSEL, 1113 TBM_SETSELSTART, 1114 TBM_SETSELEND, // = WM_USER+12, 1115 TBM_GETPTICS = WM_USER+14, 1116 TBM_GETTICPOS, 1117 TBM_GETNUMTICS, 1118 TBM_GETSELSTART, 1119 TBM_GETSELEND, 1120 TBM_CLEARSEL, 1121 TBM_SETTICFREQ, 1122 TBM_SETPAGESIZE, 1123 TBM_GETPAGESIZE, 1124 TBM_SETLINESIZE, 1125 TBM_GETLINESIZE, 1126 TBM_GETTHUMBRECT, 1127 TBM_GETCHANNELRECT, 1128 TBM_SETTHUMBLENGTH, 1129 TBM_GETTHUMBLENGTH, 1130 TBM_SETTOOLTIPS, 1131 TBM_GETTOOLTIPS, 1132 TBM_SETTIPSIDE, 1133 TBM_SETBUDDY, 1134 TBM_GETBUDDY, // = WM_USER+33, 1135 TBM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT, 1136 TBM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT 1137 } 1138 1139 enum { 1140 TB_LINEUP, 1141 TB_LINEDOWN, 1142 TB_PAGEUP, 1143 TB_PAGEDOWN, 1144 TB_THUMBPOSITION, 1145 TB_THUMBTRACK, 1146 TB_TOP, 1147 TB_BOTTOM, 1148 TB_ENDTRACK // = 8 1149 } 1150 1151 enum { 1152 HOTKEYF_SHIFT = 1, 1153 HOTKEYF_CONTROL = 2, 1154 HOTKEYF_ALT = 4, 1155 HOTKEYF_EXT = 8 1156 } 1157 1158 enum { 1159 HKCOMB_NONE = 1, 1160 HKCOMB_S = 2, 1161 HKCOMB_C = 4, 1162 HKCOMB_A = 8, 1163 HKCOMB_SC = 16, 1164 HKCOMB_SA = 32, 1165 HKCOMB_CA = 64, 1166 HKCOMB_SCA = 128 1167 } 1168 1169 enum { 1170 HKM_SETHOTKEY = WM_USER + 1, 1171 HKM_GETHOTKEY = WM_USER + 2, 1172 HKM_SETRULES = WM_USER + 3 1173 } 1174 1175 enum { 1176 PBM_SETRANGE = WM_USER + 1, 1177 PBM_SETPOS, 1178 PBM_DELTAPOS, 1179 PBM_SETSTEP, 1180 PBM_STEPIT, // = WM_USER + 5 1181 PBM_SETRANGE32 = 1030, 1182 PBM_GETRANGE, 1183 PBM_GETPOS, 1184 PBM_SETBARCOLOR, // = 1033 1185 PBM_SETBKCOLOR = CCM_SETBKCOLOR 1186 } 1187 1188 static if (_WIN32_WINNT >= 0x501) { 1189 enum { 1190 PBM_SETMARQUEE = WM_USER + 10, 1191 } 1192 } 1193 1194 static if (_WIN32_WINNT >= 0x600) { 1195 enum { 1196 PBM_GETSTEP = WM_USER + 13, 1197 PBM_GETBKCOLOR, 1198 PBM_GETBARCOLOR, 1199 PBM_SETSTATE, 1200 PBM_GETSTATE, 1201 } 1202 } 1203 1204 enum { 1205 PBS_SMOOTH = 1, 1206 PBS_VERTICAL = 4 1207 } 1208 1209 static if (_WIN32_WINNT >= 0x501) { 1210 enum { 1211 PBS_MARQUEE = 8, 1212 } 1213 } 1214 1215 static if (_WIN32_WINNT >= 0x600) { 1216 enum { 1217 PBS_SMOOTHREVERSE = 16, 1218 } 1219 } 1220 1221 enum { 1222 LVS_ICON, 1223 LVS_REPORT, 1224 LVS_SMALLICON, 1225 LVS_LIST, // = 3 1226 LVS_TYPEMASK = 3, 1227 LVS_SINGLESEL = 4, 1228 LVS_SHOWSELALWAYS = 8, 1229 LVS_SORTASCENDING = 16, 1230 LVS_SORTDESCENDING = 32, 1231 LVS_SHAREIMAGELISTS = 64, 1232 LVS_NOLABELWRAP = 128, 1233 LVS_AUTOARRANGE = 256, 1234 LVS_EDITLABELS = 512, 1235 LVS_NOSCROLL = 0x2000, 1236 LVS_TYPESTYLEMASK = 0xFC00, 1237 LVS_ALIGNTOP = 0, 1238 LVS_ALIGNLEFT = 0x800, 1239 LVS_ALIGNMASK = 0xC00, 1240 LVS_OWNERDRAWFIXED = 0x400, 1241 LVS_NOCOLUMNHEADER = 0x4000, 1242 LVS_NOSORTHEADER = 0x8000 1243 } 1244 1245 static if (_WIN32_IE >= 0x300) { 1246 enum { 1247 CDIS_CHECKED = 8, 1248 CDIS_DEFAULT = 32, 1249 CDIS_DISABLED = 4, 1250 CDIS_FOCUS = 16, 1251 CDIS_GRAYED = 2, 1252 CDIS_HOT = 64, 1253 CDIS_SELECTED = 1, 1254 CDIS_MARKED = 128, 1255 CDIS_INDETERMINATE = 256 1256 } 1257 1258 static if (_WIN32_WINNT >= 0x501) { 1259 enum { 1260 CDIS_SHOWKEYBOARDCUES = 512 1261 } 1262 } 1263 1264 enum { 1265 CDDS_POSTERASE = 4, 1266 CDDS_POSTPAINT = 2, 1267 CDDS_PREERASE = 3, 1268 CDDS_PREPAINT = 1, 1269 CDDS_ITEM = 65536, 1270 CDDS_ITEMPOSTERASE = 65540, 1271 CDDS_ITEMPOSTPAINT = 65538, 1272 CDDS_ITEMPREERASE = 65539, 1273 CDDS_ITEMPREPAINT = 65537 1274 } 1275 1276 static if (_WIN32_IE >= 0x400) { 1277 enum { 1278 CDDS_SUBITEM = 0x20000 1279 } 1280 } 1281 1282 enum { 1283 CDRF_DODEFAULT = 0x00, 1284 CDRF_NOTIFYITEMDRAW = 0x20, 1285 CDRF_NOTIFYSUBITEMDRAW = 0x20, 1286 CDRF_NOTIFYITEMERASE = 0x80, 1287 CDRF_NOTIFYPOSTERASE = 0x40, 1288 CDRF_NOTIFYPOSTPAINT = 0x10, 1289 CDRF_NEWFONT = 0x02, 1290 CDRF_SKIPDEFAULT = 0x04 1291 } 1292 1293 static if (_WIN32_IE >= 0x400) { 1294 enum { 1295 LVBKIF_SOURCE_NONE = 0x00000000, 1296 LVBKIF_SOURCE_HBITMAP = 0x00000001, 1297 LVBKIF_SOURCE_URL = 0x00000002, 1298 LVBKIF_SOURCE_MASK = 0x00000003, 1299 LVBKIF_STYLE_NORMAL = 0x00000000, 1300 LVBKIF_STYLE_TILE = 0x00000010, 1301 LVBKIF_STYLE_MASK = 0x00000010 1302 } 1303 } 1304 1305 static if (_WIN32_WINNT >= 0x501) { 1306 enum { 1307 LVBKIF_FLAG_TILEOFFSET = 0x00000100, 1308 LVBKIF_TYPE_WATERMARK = 0x10000000 1309 } 1310 } 1311 1312 enum { 1313 LVS_OWNERDATA = 4096 1314 } 1315 1316 enum { 1317 LVS_EX_CHECKBOXES = 4, 1318 LVS_EX_FULLROWSELECT = 32, 1319 LVS_EX_GRIDLINES = 1, 1320 LVS_EX_HEADERDRAGDROP = 16, 1321 LVS_EX_ONECLICKACTIVATE = 64, 1322 LVS_EX_SUBITEMIMAGES = 2, 1323 LVS_EX_TRACKSELECT = 8, 1324 LVS_EX_TWOCLICKACTIVATE = 128 1325 } 1326 1327 enum { 1328 LVSICF_NOINVALIDATEALL = 0x00000001, 1329 LVSICF_NOSCROLL = 0x00000002 1330 } 1331 1332 static if (_WIN32_IE >= 0x400) { 1333 enum { 1334 LVS_EX_FLATSB = 0x00000100, 1335 LVS_EX_REGIONAL = 0x00000200, 1336 LVS_EX_INFOTIP = 0x00000400, 1337 LVS_EX_UNDERLINEHOT = 0x00000800, 1338 LVS_EX_UNDERLINECOLD = 0x00001000, 1339 LVS_EX_MULTIWORKAREAS = 0x00002000 1340 } 1341 } 1342 1343 static if (_WIN32_IE >= 0x500) { 1344 enum { 1345 LVS_EX_LABELTIP = 0x00004000, 1346 LVS_EX_BORDERSELECT = 0x00008000 1347 } 1348 } 1349 } 1350 1351 enum { 1352 LVSIL_NORMAL, 1353 LVSIL_SMALL, 1354 LVSIL_STATE 1355 } 1356 1357 enum { 1358 LVM_GETBKCOLOR = LVM_FIRST, 1359 LVM_SETBKCOLOR, 1360 LVM_GETIMAGELIST, 1361 LVM_SETIMAGELIST, 1362 LVM_GETITEMCOUNT, // = LVM_FIRST + 4 1363 LVM_SORTITEMSEX = LVM_FIRST + 81, 1364 LVM_GETGROUPSTATE = LVM_FIRST + 92, 1365 LVM_GETFOCUSEDGROUP, 1366 LVM_GETGROUPRECT = LVM_FIRST + 98, 1367 LVM_SETVIEW = LVM_FIRST + 142, 1368 LVM_GETVIEW, // = LVM_FIRST + 143 1369 LVM_INSERTGROUP = LVM_FIRST + 145, 1370 LVM_SETGROUPINFO = LVM_FIRST + 147, 1371 LVM_GETGROUPINFO = LVM_FIRST + 149, 1372 LVM_REMOVEGROUP, 1373 LVM_MOVEGROUP, // = LVM_FIRST + 151 1374 LVM_GETGROUPCOUNT, 1375 LVM_GETGROUPINFOBYINDEX, 1376 LVM_MOVEITEMTOGROUP, 1377 LVM_SETGROUPMETRICS = LVM_FIRST + 155, 1378 LVM_GETGROUPMETRICS, 1379 LVM_ENABLEGROUPVIEW, 1380 LVM_SORTGROUPS, 1381 LVM_INSERTGROUPSORTED, 1382 LVM_REMOVEALLGROUPS, 1383 LVM_HASGROUP, 1384 LVM_SETTILEVIEWINFO, 1385 LVM_GETTILEVIEWINFO, 1386 LVM_SETTILEINFO, 1387 LVM_GETTILEINFO, 1388 LVM_SETINSERTMARK, 1389 LVM_GETINSERTMARK, 1390 LVM_INSERTMARKHITTEST, 1391 LVM_GETINSERTMARKRECT, 1392 LVM_SETINSERTMARKCOLOR, 1393 LVM_GETINSERTMARKCOLOR, // = LVM_FIRST + 171 1394 LVM_SETINFOTIP = LVM_FIRST + 173, 1395 LVM_GETSELECTEDCOLUMN, 1396 LVM_ISGROUPVIEWENABLED, 1397 LVM_GETOUTLINECOLOR, 1398 LVM_SETOUTLINECOLOR, // = LVM_FIRST + 177 1399 LVM_CANCELEDITLABEL = LVM_FIRST + 179, 1400 LVM_MAPINDEXTOID = LVM_FIRST + 180, 1401 LVM_MAPIDTOINDEX = LVM_FIRST + 181, 1402 LVM_ISITEMVISIBLE = LVM_FIRST + 182, 1403 } 1404 1405 static if (_WIN32_WINNT >= 0x501) { 1406 enum { 1407 LVM_SETSELECTEDCOLUMN = LVM_FIRST + 140 1408 } 1409 } 1410 1411 static if (_WIN32_WINNT >= 0x600) { 1412 enum { 1413 LVM_GETEMPTYTEXT = LVM_FIRST + 204, 1414 LVM_GETFOOTERRECT = LVM_FIRST + 205, 1415 LVM_GETFOOTERINFO = LVM_FIRST + 206, 1416 LVM_GETFOOTERITEMRECT = LVM_FIRST + 207, 1417 LVM_GETFOOTERITEM = (LVM_FIRST + 208), 1418 LVM_GETITEMINDEXRECT = (LVM_FIRST + 209), 1419 LVM_SETITEMINDEXSTATE = (LVM_FIRST + 210), 1420 LVM_GETNEXTITEMINDEX = (LVM_FIRST + 211), 1421 } 1422 } 1423 1424 enum { 1425 LVIF_TEXT = 1, 1426 LVIF_IMAGE = 2, 1427 LVIF_PARAM = 4, 1428 LVIF_STATE = 8 1429 } 1430 1431 static if (_WIN32_IE >= 0x300) { 1432 enum { 1433 LVIF_INDENT = 16, 1434 LVIF_NORECOMPUTE = 2048 1435 } 1436 } 1437 1438 static if (_WIN32_WINNT >= 0x501) { 1439 enum { 1440 LVIF_GROUPID = 128, 1441 LVIF_COLUMNS = 256 1442 } 1443 } 1444 1445 enum { 1446 LVIS_FOCUSED = 1, 1447 LVIS_SELECTED = 2, 1448 LVIS_CUT = 4, 1449 LVIS_DROPHILITED = 8, 1450 LVIS_OVERLAYMASK = 0xF00, 1451 LVIS_STATEIMAGEMASK = 0xF000 1452 } 1453 1454 enum LPWSTR LPSTR_TEXTCALLBACKW = cast(LPWSTR) -1; 1455 enum LPSTR LPSTR_TEXTCALLBACKA = cast(LPSTR) -1; 1456 1457 enum I_IMAGECALLBACK = -1; 1458 1459 static if (_WIN32_IE >= 0x400) { 1460 enum { 1461 LVM_SETBKIMAGEA = LVM_FIRST + 68, 1462 LVM_SETBKIMAGEW = LVM_FIRST + 138, 1463 LVM_GETBKIMAGEA = LVM_FIRST + 69, 1464 LVM_GETBKIMAGEW = LVM_FIRST + 139, 1465 LV_MAX_WORKAREAS = 16, 1466 LVM_SETWORKAREAS = LVM_FIRST + 65, 1467 LVM_GETWORKAREAS = LVM_FIRST + 70, 1468 LVM_GETNUMBEROFWORKAREAS = LVM_FIRST + 73, 1469 LVM_GETSELECTIONMARK = LVM_FIRST + 66, 1470 LVM_SETSELECTIONMARK = LVM_FIRST + 67, 1471 LVM_SETHOVERTIME = LVM_FIRST + 71, 1472 LVM_GETHOVERTIME = LVM_FIRST + 72, 1473 LVM_SETTOOLTIPS = LVM_FIRST + 74, 1474 LVM_GETTOOLTIPS = LVM_FIRST + 78, 1475 LVM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT, 1476 LVM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT 1477 } 1478 } 1479 1480 enum { 1481 LVNI_ALL, 1482 LVNI_FOCUSED = 1, 1483 LVNI_SELECTED = 2, 1484 LVNI_CUT = 4, 1485 LVNI_DROPHILITED = 8, 1486 LVNI_ABOVE = 256, 1487 LVNI_BELOW = 512, 1488 LVNI_TOLEFT = 1024, 1489 LVNI_TORIGHT = 2048 1490 } 1491 1492 enum { 1493 LVM_GETITEMA = LVM_FIRST + 5, 1494 LVM_SETITEMA, 1495 LVM_INSERTITEMA, 1496 LVM_DELETEITEM, 1497 LVM_DELETEALLITEMS, 1498 LVM_GETCALLBACKMASK, 1499 LVM_SETCALLBACKMASK, 1500 LVM_GETNEXTITEM, 1501 LVM_FINDITEMA, 1502 LVM_GETITEMRECT, 1503 LVM_SETITEMPOSITION, 1504 LVM_GETITEMPOSITION, 1505 LVM_GETSTRINGWIDTHA, 1506 LVM_HITTEST, 1507 LVM_ENSUREVISIBLE, 1508 LVM_SCROLL, 1509 LVM_REDRAWITEMS, 1510 LVM_ARRANGE, 1511 LVM_EDITLABELA, 1512 LVM_GETEDITCONTROL, 1513 LVM_GETCOLUMNA, 1514 LVM_SETCOLUMNA, 1515 LVM_INSERTCOLUMNA, 1516 LVM_DELETECOLUMN, 1517 LVM_GETCOLUMNWIDTH, 1518 LVM_SETCOLUMNWIDTH, // = LVM_FIRST + 30, 1519 LVM_CREATEDRAGIMAGE = LVM_FIRST + 33, 1520 LVM_GETVIEWRECT, 1521 LVM_GETTEXTCOLOR, 1522 LVM_SETTEXTCOLOR, 1523 LVM_GETTEXTBKCOLOR, 1524 LVM_SETTEXTBKCOLOR, 1525 LVM_GETTOPINDEX, 1526 LVM_GETCOUNTPERPAGE, 1527 LVM_GETORIGIN, 1528 LVM_UPDATE, 1529 LVM_SETITEMSTATE, 1530 LVM_GETITEMSTATE, 1531 LVM_GETITEMTEXTA, 1532 LVM_SETITEMTEXTA, 1533 LVM_SETITEMCOUNT, 1534 LVM_SORTITEMS, 1535 LVM_SETITEMPOSITION32, 1536 LVM_GETSELECTEDCOUNT, 1537 LVM_GETITEMSPACING, 1538 LVM_GETISEARCHSTRINGA, // = LVM_FIRST + 52, 1539 LVM_GETITEMW = LVM_FIRST + 75, 1540 LVM_SETITEMW = LVM_FIRST + 76, 1541 LVM_INSERTITEMW = LVM_FIRST + 77, 1542 LVM_FINDITEMW = LVM_FIRST + 83, 1543 LVM_GETSTRINGWIDTHW = LVM_FIRST + 87, 1544 LVM_GETCOLUMNW = LVM_FIRST + 95, 1545 LVM_SETCOLUMNW = LVM_FIRST + 96, 1546 LVM_INSERTCOLUMNW = LVM_FIRST + 97, 1547 LVM_GETITEMTEXTW = LVM_FIRST + 115, 1548 LVM_SETITEMTEXTW, 1549 LVM_GETISEARCHSTRINGW, 1550 LVM_EDITLABELW // = LVM_FIRST + 118, 1551 } 1552 1553 static if (_WIN32_IE >= 0x300) { 1554 enum { 1555 LVM_GETHEADER = LVM_FIRST + 31, 1556 LVM_SETICONSPACING = LVM_FIRST + 53, 1557 LVM_SETEXTENDEDLISTVIEWSTYLE, 1558 LVM_GETEXTENDEDLISTVIEWSTYLE, 1559 LVM_GETSUBITEMRECT, 1560 LVM_SUBITEMHITTEST, 1561 LVM_SETCOLUMNORDERARRAY, 1562 LVM_GETCOLUMNORDERARRAY, 1563 LVM_SETHOTITEM, 1564 LVM_GETHOTITEM, 1565 LVM_SETHOTCURSOR, 1566 LVM_GETHOTCURSOR, 1567 LVM_APPROXIMATEVIEWRECT // = LVM_FIRST + 64, 1568 } 1569 } 1570 1571 enum { 1572 LVFI_PARAM = 1, 1573 LVFI_STRING = 2, 1574 LVFI_PARTIAL = 8, 1575 LVFI_WRAP = 32, 1576 LVFI_NEARESTXY = 64 1577 } 1578 1579 enum { 1580 LVIF_DI_SETITEM = 0x1000 1581 } 1582 1583 enum { 1584 LVIR_BOUNDS, 1585 LVIR_ICON, 1586 LVIR_LABEL, 1587 LVIR_SELECTBOUNDS // = 3 1588 } 1589 1590 enum { 1591 LVHT_NOWHERE = 1, 1592 LVHT_ONITEMICON = 2, 1593 LVHT_ONITEMLABEL = 4, 1594 LVHT_ONITEMSTATEICON = 8, 1595 LVHT_ONITEM = LVHT_ONITEMICON | LVHT_ONITEMLABEL 1596 | LVHT_ONITEMSTATEICON, 1597 LVHT_ABOVE = 8, 1598 LVHT_BELOW = 16, 1599 LVHT_TORIGHT = 32, 1600 LVHT_TOLEFT = 64 1601 } 1602 1603 enum { 1604 LVA_DEFAULT = 0, 1605 LVA_ALIGNLEFT = 1, 1606 LVA_ALIGNTOP = 2, 1607 LVA_SNAPTOGRID = 5 1608 } 1609 1610 enum { 1611 LVCF_FMT = 1, 1612 LVCF_WIDTH = 2, 1613 LVCF_TEXT = 4, 1614 LVCF_SUBITEM = 8 1615 } 1616 1617 static if (_WIN32_IE >= 0x300) { 1618 enum { 1619 LVCF_IMAGE = 16, 1620 LVCF_ORDER = 32 1621 } 1622 } 1623 1624 enum { 1625 LVCFMT_LEFT, 1626 LVCFMT_RIGHT, 1627 LVCFMT_CENTER, 1628 LVCFMT_JUSTIFYMASK // = 3 1629 } 1630 1631 static if (_WIN32_IE >= 0x300) { 1632 enum { 1633 LVCFMT_IMAGE = 2048, 1634 LVCFMT_BITMAP_ON_RIGHT = 4096, 1635 LVCFMT_COL_HAS_IMAGES = 32768 1636 } 1637 } 1638 1639 enum { 1640 LVSCW_AUTOSIZE = -1, 1641 LVSCW_AUTOSIZE_USEHEADER = -2 1642 } 1643 1644 enum { 1645 LVN_ITEMCHANGING = LVN_FIRST, 1646 LVN_ITEMCHANGED = LVN_FIRST - 1, 1647 LVN_INSERTITEM = LVN_FIRST - 2, 1648 LVN_DELETEITEM = LVN_FIRST - 3, 1649 LVN_DELETEALLITEMS = LVN_FIRST - 4, 1650 LVN_BEGINLABELEDITA = LVN_FIRST - 5, 1651 LVN_ENDLABELEDITA = LVN_FIRST - 6, 1652 LVN_COLUMNCLICK = LVN_FIRST - 8, 1653 LVN_BEGINDRAG = LVN_FIRST - 9, 1654 LVN_BEGINRDRAG = LVN_FIRST - 11, 1655 LVN_GETDISPINFOA = LVN_FIRST - 50, 1656 LVN_SETDISPINFOA = LVN_FIRST - 51, 1657 LVN_KEYDOWN = LVN_FIRST - 55, 1658 LVN_BEGINLABELEDITW = LVN_FIRST - 75, 1659 LVN_ENDLABELEDITW = LVN_FIRST - 76, 1660 LVN_GETDISPINFOW = LVN_FIRST - 77, 1661 LVN_SETDISPINFOW = LVN_FIRST - 78 1662 } 1663 1664 static if (_WIN32_IE >= 0x400) { 1665 enum { 1666 LVN_MARQUEEBEGIN = LVN_FIRST - 56, 1667 LVN_GETINFOTIPA = LVN_FIRST - 57, 1668 LVN_GETINFOTIPW = LVN_FIRST - 58, 1669 LVKF_ALT = 1, 1670 LVKF_CONTROL = 2, 1671 LVKF_SHIFT = 4, 1672 LVGIT_UNFOLDED = 1 1673 } 1674 } 1675 1676 enum { 1677 TVS_HASBUTTONS = 1, 1678 TVS_HASLINES = 2, 1679 TVS_LINESATROOT = 4, 1680 TVS_EDITLABELS = 8, 1681 TVS_DISABLEDRAGDROP = 16, 1682 TVS_SHOWSELALWAYS = 32 1683 } 1684 1685 static if (_WIN32_IE >= 0x300) { 1686 enum { 1687 TVS_RTLREADING = 64, 1688 TVS_NOTOOLTIPS = 128, 1689 TVS_CHECKBOXES = 256, 1690 TVS_TRACKSELECT = 512 1691 } 1692 } 1693 1694 static if (_WIN32_IE >= 0x400) { 1695 enum { 1696 TVS_SINGLEEXPAND = 1024, 1697 TVS_INFOTIP = 2048, 1698 TVS_FULLROWSELECT = 4096, 1699 TVS_NOSCROLL = 8192, 1700 TVS_NONEVENHEIGHT = 16384 1701 } 1702 } 1703 1704 static if (_WIN32_IE >= 0x500) { 1705 enum { 1706 TVS_NOHSCROLL = 0x8000 1707 } 1708 } 1709 1710 enum { 1711 TVIF_TEXT = 1, 1712 TVIF_IMAGE = 2, 1713 TVIF_PARAM = 4, 1714 TVIF_STATE = 8, 1715 TVIF_HANDLE = 16, 1716 TVIF_SELECTEDIMAGE = 32, 1717 TVIF_CHILDREN = 64 1718 } 1719 1720 static if (_WIN32_IE >= 0x400) { 1721 enum { 1722 TVIF_INTEGRAL = 0x0080 1723 } 1724 } 1725 1726 enum { 1727 TVIS_FOCUSED = 1, 1728 TVIS_SELECTED = 2, 1729 TVIS_CUT = 4, 1730 TVIS_DROPHILITED = 8, 1731 TVIS_BOLD = 16, 1732 TVIS_EXPANDED = 32, 1733 TVIS_EXPANDEDONCE = 64, 1734 TVIS_OVERLAYMASK = 0xF00, 1735 TVIS_STATEIMAGEMASK = 0xF000, 1736 TVIS_USERMASK = 0xF000 1737 } 1738 1739 enum { 1740 I_CHILDRENCALLBACK = -1 1741 } 1742 1743 mixin DECLARE_HANDLE!("HTREEITEM"); 1744 mixin DECLARE_HANDLE!("HIMAGELIST"); 1745 1746 version (Win64) 1747 { 1748 enum HTREEITEM 1749 TVI_ROOT = cast(HTREEITEM) cast(ULONG_PTR)-0x10000, 1750 TVI_FIRST = cast(HTREEITEM) cast(ULONG_PTR)-0xffff, 1751 TVI_LAST = cast(HTREEITEM) cast(ULONG_PTR)-0xfffe, 1752 TVI_SORT = cast(HTREEITEM) cast(ULONG_PTR)-0xfffd; 1753 } else { 1754 enum HTREEITEM 1755 TVI_ROOT = cast(HTREEITEM) 0xFFFF0000, 1756 TVI_FIRST = cast(HTREEITEM) 0xFFFF0001, 1757 TVI_LAST = cast(HTREEITEM) 0xFFFF0002, 1758 TVI_SORT = cast(HTREEITEM) 0xFFFF0003; 1759 } 1760 1761 enum { 1762 TVSIL_NORMAL = 0, 1763 TVSIL_STATE = 2 1764 } 1765 1766 enum { 1767 TVM_INSERTITEMA = TV_FIRST, 1768 TVM_DELETEITEM = TV_FIRST + 1, 1769 TVM_EXPAND = TV_FIRST + 2, 1770 TVM_GETITEMRECT = TV_FIRST + 4, 1771 TVM_GETCOUNT, 1772 TVM_GETINDENT, 1773 TVM_SETINDENT, 1774 TVM_GETIMAGELIST, 1775 TVM_SETIMAGELIST, 1776 TVM_GETNEXTITEM, 1777 TVM_SELECTITEM, 1778 TVM_GETITEMA, 1779 TVM_SETITEMA, 1780 TVM_EDITLABELA, 1781 TVM_GETEDITCONTROL, 1782 TVM_GETVISIBLECOUNT, 1783 TVM_HITTEST, 1784 TVM_CREATEDRAGIMAGE, 1785 TVM_SORTCHILDREN, 1786 TVM_ENSUREVISIBLE, 1787 TVM_SORTCHILDRENCB, 1788 TVM_ENDEDITLABELNOW, 1789 TVM_GETISEARCHSTRINGA, // = TV_FIRST + 23 1790 TVM_INSERTITEMW = TV_FIRST + 50, 1791 TVM_GETITEMW = TV_FIRST + 62, 1792 TVM_SETITEMW = TV_FIRST + 63, 1793 TVM_GETISEARCHSTRINGW = TV_FIRST + 64, 1794 TVM_EDITLABELW = TV_FIRST + 65 1795 } 1796 1797 static if (_WIN32_IE >= 0x300) { 1798 enum { 1799 TVM_GETTOOLTIPS = TV_FIRST + 25, 1800 TVM_SETTOOLTIPS = TV_FIRST + 24 1801 } 1802 } 1803 1804 static if (_WIN32_IE >= 0x400) { 1805 enum { 1806 TVM_SETINSERTMARK = TV_FIRST + 26, 1807 TVM_SETITEMHEIGHT, 1808 TVM_GETITEMHEIGHT, 1809 TVM_SETBKCOLOR, 1810 TVM_SETTEXTCOLOR, 1811 TVM_GETBKCOLOR, 1812 TVM_GETTEXTCOLOR, 1813 TVM_SETSCROLLTIME, 1814 TVM_GETSCROLLTIME, // = TV_FIRST + 34 1815 TVM_SETINSERTMARKCOLOR = TV_FIRST + 37, 1816 TVM_GETINSERTMARKCOLOR = TV_FIRST + 38, 1817 TVM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT, 1818 TVM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT 1819 } 1820 } 1821 1822 static if (_WIN32_IE >= 0x500) { 1823 enum { 1824 TVM_GETITEMSTATE = TV_FIRST + 39, 1825 TVM_SETLINECOLOR = TV_FIRST + 40, 1826 TVM_GETLINECOLOR = TV_FIRST + 41 1827 } 1828 } 1829 1830 static if (_WIN32_IE >= 0x501) { 1831 enum { 1832 TVM_MAPACCIDTOHTREEITEM = TV_FIRST + 42, 1833 TVM_MAPHTREEITEMTOACCID = TV_FIRST + 43, 1834 TVM_SETEXTENDEDSTYLE = TV_FIRST + 44, 1835 TVM_GETEXTENDEDSTYLE = TV_FIRST + 45, 1836 TVM_SETAUTOSCROLLINFO = TV_FIRST + 59 1837 } 1838 } 1839 1840 static if (_WIN32_IE >= 0x600) { 1841 enum { 1842 TVM_GETSELECTEDCOUNT = TV_FIRST + 70, 1843 TVM_SHOWINFOTIP = TV_FIRST + 71, 1844 TVM_GETITEMPARTRECT = TV_FIRST + 72, 1845 } 1846 } 1847 1848 enum { 1849 TVE_COLLAPSE = 1, 1850 TVE_EXPAND = 2, 1851 TVE_TOGGLE = 3, 1852 TVE_COLLAPSERESET = 0x8000 1853 } 1854 1855 static if (_WIN32_IE >= 0x300) { 1856 enum { 1857 TVE_EXPANDPARTIAL = 0x4000 1858 } 1859 } 1860 1861 enum { 1862 TVC_UNKNOWN, 1863 TVC_BYMOUSE, 1864 TVC_BYKEYBOARD // = 2 1865 } 1866 1867 enum { 1868 TVGN_ROOT, 1869 TVGN_NEXT, 1870 TVGN_PREVIOUS, 1871 TVGN_PARENT, 1872 TVGN_CHILD, 1873 TVGN_FIRSTVISIBLE, 1874 TVGN_NEXTVISIBLE, 1875 TVGN_PREVIOUSVISIBLE, 1876 TVGN_DROPHILITE, 1877 TVGN_CARET // = 9 1878 } 1879 1880 static if (_WIN32_IE >= 0x400) { 1881 enum { 1882 TVGN_LASTVISIBLE = 10 1883 } 1884 } 1885 1886 static if (_WIN32_IE >= 0x600) { 1887 enum { 1888 TVGN_NEXTSELECTED = 11 1889 } 1890 } 1891 1892 enum { 1893 TVN_SELCHANGINGA = TVN_FIRST - 1, 1894 TVN_SELCHANGEDA = TVN_FIRST - 2, 1895 TVN_GETDISPINFOA = TVN_FIRST - 3, 1896 TVN_SETDISPINFOA = TVN_FIRST - 4, 1897 TVN_ITEMEXPANDINGA = TVN_FIRST - 5, 1898 TVN_ITEMEXPANDEDA = TVN_FIRST - 6, 1899 TVN_BEGINDRAGA = TVN_FIRST - 7, 1900 TVN_BEGINRDRAGA = TVN_FIRST - 8, 1901 TVN_DELETEITEMA = TVN_FIRST - 9, 1902 TVN_BEGINLABELEDITA = TVN_FIRST - 10, 1903 TVN_ENDLABELEDITA = TVN_FIRST - 11, 1904 TVN_KEYDOWN = TVN_FIRST - 12, 1905 TVN_SELCHANGINGW = TVN_FIRST - 50, 1906 TVN_SELCHANGEDW = TVN_FIRST - 51, 1907 TVN_GETDISPINFOW = TVN_FIRST - 52, 1908 TVN_SETDISPINFOW = TVN_FIRST - 53, 1909 TVN_ITEMEXPANDINGW = TVN_FIRST - 54, 1910 TVN_ITEMEXPANDEDW = TVN_FIRST - 55, 1911 TVN_BEGINDRAGW = TVN_FIRST - 56, 1912 TVN_BEGINRDRAGW = TVN_FIRST - 57, 1913 TVN_DELETEITEMW = TVN_FIRST - 58, 1914 TVN_BEGINLABELEDITW = TVN_FIRST - 59, 1915 TVN_ENDLABELEDITW = TVN_FIRST - 60 1916 } 1917 1918 static if (_WIN32_IE >= 0x400) { 1919 enum { 1920 TVNRET_DEFAULT = 0, 1921 TVNRET_SKIPOLD = 1, 1922 TVNRET_SKIPNEW = 2, 1923 TVN_GETINFOTIPA = TVN_FIRST - 13, 1924 TVN_GETINFOTIPW = TVN_FIRST - 14, 1925 TVN_SINGLEEXPAND = TVN_FIRST - 15 1926 } 1927 } 1928 1929 enum { 1930 TVIF_DI_SETITEM = 0x1000 1931 } 1932 1933 enum { 1934 TVHT_NOWHERE = 1, 1935 TVHT_ONITEMICON = 2, 1936 TVHT_ONITEMLABEL = 4, 1937 TVHT_ONITEMINDENT = 8, 1938 TVHT_ONITEMBUTTON = 16, 1939 TVHT_ONITEMRIGHT = 32, 1940 TVHT_ONITEMSTATEICON = 64, 1941 TVHT_ABOVE = 256, 1942 TVHT_BELOW = 512, 1943 TVHT_TORIGHT = 1024, 1944 TVHT_TOLEFT = 2048, 1945 TCHT_NOWHERE = 1, 1946 TCHT_ONITEMICON = 2, 1947 TCHT_ONITEMLABEL = 4, 1948 TVHT_ONITEM = TVHT_ONITEMICON | TVHT_ONITEMLABEL 1949 | TVHT_ONITEMSTATEICON, 1950 TCHT_ONITEM = TCHT_ONITEMICON | TCHT_ONITEMLABEL 1951 } 1952 1953 enum { 1954 TCS_TABS = 0, 1955 TCS_RIGHTJUSTIFY = 0, 1956 TCS_SINGLELINE = 0, 1957 TCS_FORCEICONLEFT = 16, 1958 TCS_FORCELABELLEFT = 32, 1959 TCS_BUTTONS = 256, 1960 TCS_MULTILINE = 512, 1961 TCS_FIXEDWIDTH = 1024, 1962 TCS_RAGGEDRIGHT = 2048, 1963 TCS_FOCUSONBUTTONDOWN = 0x1000, 1964 TCS_OWNERDRAWFIXED = 0x2000, 1965 TCS_TOOLTIPS = 0x4000, 1966 TCS_FOCUSNEVER = 0x8000 1967 } 1968 1969 static if (_WIN32_IE >= 0x300) { 1970 enum { 1971 TCS_BOTTOM = 2, 1972 TCS_RIGHT = 2, 1973 TCS_VERTICAL = 128, 1974 TCS_SCROLLOPPOSITE = 0x0001, 1975 TCS_HOTTRACK = 0x0040, 1976 TCS_MULTISELECT = 0x0004 1977 } 1978 } 1979 1980 static if (_WIN32_IE >= 0x400) { 1981 enum { 1982 TCS_FLATBUTTONS = 0x0008, 1983 TCS_EX_FLATSEPARATORS = 0x00000001, 1984 TCS_EX_REGISTERDROP = 0x00000002 1985 } 1986 } 1987 1988 enum { 1989 TCIF_TEXT = 1, 1990 TCIF_IMAGE = 2, 1991 TCIF_RTLREADING = 4, 1992 TCIF_PARAM = 8 1993 } 1994 1995 static if (_WIN32_IE >= 0x400) { 1996 enum { 1997 TCIF_STATE = 16 1998 } 1999 } 2000 2001 enum { 2002 TCIS_BUTTONPRESSED = 1 2003 } 2004 2005 static if (_WIN32_IE >= 0x400) { 2006 enum { 2007 TCIS_HIGHLIGHTED = 2 2008 } 2009 } 2010 2011 enum { 2012 TCM_FIRST = 0x1300, 2013 TCM_GETIMAGELIST = TCM_FIRST + 2, 2014 TCM_SETIMAGELIST, 2015 TCM_GETITEMCOUNT, 2016 TCM_GETITEMA, 2017 TCM_SETITEMA, 2018 TCM_INSERTITEMA, 2019 TCM_DELETEITEM, 2020 TCM_DELETEALLITEMS, 2021 TCM_GETITEMRECT, 2022 TCM_GETCURSEL, 2023 TCM_SETCURSEL, 2024 TCM_HITTEST, 2025 TCM_SETITEMEXTRA, // = TCM_FIRST + 14 2026 TCM_ADJUSTRECT = TCM_FIRST + 40, 2027 TCM_SETITEMSIZE, 2028 TCM_REMOVEIMAGE, 2029 TCM_SETPADDING, 2030 TCM_GETROWCOUNT, 2031 TCM_GETTOOLTIPS, 2032 TCM_SETTOOLTIPS, 2033 TCM_GETCURFOCUS, 2034 TCM_SETCURFOCUS, 2035 TCM_SETMINTABWIDTH, 2036 TCM_DESELECTALL, // = TCM_FIRST + 50 2037 TCM_GETITEMW = TCM_FIRST + 60, 2038 TCM_SETITEMW = TCM_FIRST + 61, 2039 TCM_INSERTITEMW = TCM_FIRST + 62 2040 } 2041 2042 static if (_WIN32_IE >=0x0400) { 2043 enum { 2044 TCM_HIGHLIGHTITEM = TCM_FIRST + 51, 2045 TCM_SETEXTENDEDSTYLE = TCM_FIRST + 52, 2046 TCM_GETEXTENDEDSTYLE = TCM_FIRST + 53, 2047 TCM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT, 2048 TCM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT 2049 } 2050 } 2051 2052 enum { 2053 TCN_KEYDOWN = TCN_FIRST, 2054 TCN_SELCHANGE = TCN_FIRST - 1, 2055 TCN_SELCHANGING = TCN_FIRST - 2 2056 } 2057 2058 enum { 2059 NM_OUTOFMEMORY = NM_FIRST - 1, 2060 NM_CLICK = NM_FIRST - 2, 2061 NM_DBLCLK = NM_FIRST - 3, 2062 NM_RETURN = NM_FIRST - 4, 2063 NM_RCLICK = NM_FIRST - 5, 2064 NM_RDBLCLK = NM_FIRST - 6, 2065 NM_SETFOCUS = NM_FIRST - 7, 2066 NM_KILLFOCUS = NM_FIRST - 8, 2067 NM_CUSTOMDRAW = NM_FIRST - 12, 2068 NM_HOVER = NM_FIRST - 13, 2069 NM_NCHITTEST = NM_FIRST - 14, 2070 NM_KEYDOWN = NM_FIRST - 15, 2071 NM_RELEASEDCAPTURE = NM_FIRST - 16, 2072 NM_SETCURSOR = NM_FIRST - 17, 2073 NM_CHAR = NM_FIRST - 18, 2074 NM_TOOLTIPSCREATED = NM_FIRST - 19 2075 } 2076 2077 enum { 2078 SBARS_SIZEGRIP = 256 2079 } 2080 2081 /*enum { 2082 CCM_FIRST = 0x2000, 2083 CCM_LAST = CCM_FIRST + 0x200, 2084 CCM_SETBKCOLOR = 8193, 2085 CCM_SETCOLORSCHEME = 8194, 2086 CCM_GETCOLORSCHEME = 8195, 2087 CCM_GETDROPTARGET = 8196, 2088 CCM_SETUNICODEFORMAT = 8197, 2089 CCM_GETUNICODEFORMAT = 8198, 2090 CCM_SETVERSION = 0x2007, 2091 CCM_GETVERSION = 0x2008, 2092 CCM_SETNOTIFYWINDOW = 0x2009 2093 }*/ 2094 2095 static if (_WIN32_WINNT >= 0x501) { 2096 enum { 2097 CCM_SETWINDOWTHEME = 0x200b, 2098 CCM_DPISCALE = 0x200c, 2099 2100 RB_GETBANDMARGINS = WM_USER + 40, 2101 RB_SETWINDOWTHEME = CCM_SETWINDOWTHEME, 2102 TB_SETWINDOWTHEME = CCM_SETWINDOWTHEME, 2103 TTM_SETWINDOWTHEME = CCM_SETWINDOWTHEME, 2104 } 2105 } 2106 2107 enum { 2108 ICC_LISTVIEW_CLASSES = 1, 2109 ICC_TREEVIEW_CLASSES = 2, 2110 ICC_BAR_CLASSES = 4, 2111 ICC_TAB_CLASSES = 8, 2112 ICC_UPDOWN_CLASS = 16, 2113 ICC_PROGRESS_CLASS = 32, 2114 ICC_HOTKEY_CLASS = 64, 2115 ICC_ANIMATE_CLASS = 128, 2116 ICC_WIN95_CLASSES = 255, 2117 ICC_DATE_CLASSES = 256, 2118 ICC_USEREX_CLASSES = 512, 2119 ICC_COOL_CLASSES = 1024 2120 } 2121 2122 static if (_WIN32_IE >= 0x400) { 2123 enum { 2124 INFOTIPSIZE = 1024, 2125 ICC_INTERNET_CLASSES = 2048, 2126 ICC_PAGESCROLLER_CLASS = 4096, 2127 ICC_NATIVEFNTCTL_CLASS = 8192 2128 } 2129 } 2130 2131 static if (_WIN32_WINNT >= 0x501) { 2132 enum { 2133 ICC_STANDARD_CLASSES = 0x00004000, 2134 ICC_LINK_CLASS = 0x00008000 2135 } 2136 } 2137 2138 enum { 2139 GDTR_MIN = 1, 2140 GDTR_MAX = 2 2141 } 2142 2143 enum { 2144 GMR_VISIBLE, 2145 GMR_DAYSTATE 2146 } 2147 2148 enum { 2149 GDT_ERROR = -1, 2150 GDT_VALID = 0, 2151 GDT_NONE = 1 2152 } 2153 2154 enum { 2155 DTS_SHORTDATEFORMAT = 0, 2156 DTS_UPDOWN = 1, 2157 DTS_SHOWNONE = 2, 2158 DTS_LONGDATEFORMAT = 4, 2159 DTS_TIMEFORMAT = 9, 2160 DTS_APPCANPARSE = 16, 2161 DTS_RIGHTALIGN = 32 2162 } 2163 2164 static if (_WIN32_IE >= 0x500) { 2165 enum { 2166 DTS_SHORTDATECENTURYFORMAT = 0x000C 2167 } 2168 } 2169 2170 enum { 2171 MCS_DAYSTATE = 1, 2172 MCS_MULTISELECT = 2, 2173 MCS_WEEKNUMBERS = 4 2174 } 2175 2176 static if (_WIN32_IE >= 0x400) { 2177 enum { 2178 MCS_NOTODAYCIRCLE = 0x0008, 2179 MCS_NOTODAY = 0x0010 2180 } 2181 } else { 2182 enum { 2183 MCS_NOTODAY = 0x0008 2184 } 2185 } 2186 2187 enum { 2188 DTM_FIRST = 0x1000, 2189 DTM_GETSYSTEMTIME = 0x1001, 2190 DTM_SETSYSTEMTIME = 0x1002, 2191 DTM_GETRANGE = 0x1003, 2192 DTM_SETRANGE = 0x1004, 2193 DTM_SETFORMATA = 0x1005, 2194 DTM_SETMCCOLOR = 0x1006, 2195 DTM_GETMCCOLOR = 0x1007, 2196 DTM_GETMONTHCAL = 0x1008, 2197 DTM_SETMCFONT = 0x1009, 2198 DTM_GETMCFONT = 0x100a, 2199 DTM_SETFORMATW = 0x1050 2200 } 2201 2202 static if (_WIN32_WINNT >= 0x600) { 2203 enum { 2204 DTM_SETMCSTYLE = DTM_FIRST + 11, 2205 DTM_GETMCSTYLE, 2206 DTM_CLOSEMONTHCAL, 2207 DTM_GETDATETIMEPICKERINFO, 2208 DTM_GETIDEALSIZE, 2209 } 2210 } 2211 2212 enum { 2213 DTN_USERSTRINGA = -758U, 2214 DTN_USERSTRINGW = -745U, 2215 DTN_WMKEYDOWNA = -757U, 2216 DTN_WMKEYDOWNW = -744U, 2217 DTN_FORMATA = -756U, 2218 DTN_FORMATW = -743U, 2219 DTN_FORMATQUERYA = -755U, 2220 DTN_FORMATQUERYW = -742U, 2221 DTN_DROPDOWN = -754U, 2222 DTN_CLOSEUP = -753U, 2223 DTN_DATETIMECHANGE = -759U, 2224 } 2225 2226 enum { 2227 MCM_FIRST = 0x1000, 2228 MCM_GETCURSEL = 0x1001, 2229 MCM_SETCURSEL = 0x1002, 2230 MCM_GETMAXSELCOUNT = 0x1003, 2231 MCM_SETMAXSELCOUNT = 0x1004, 2232 MCM_GETSELRANGE = 0x1005, 2233 MCM_SETSELRANGE = 0x1006, 2234 MCM_GETMONTHRANGE = 0x1007, 2235 MCM_SETDAYSTATE = 0x1008, 2236 MCM_GETMINREQRECT = 0x1009, 2237 MCM_SETCOLOR = 0x100a, 2238 MCM_GETCOLOR = 0x100b, 2239 MCM_SETTODAY = 0x100c, 2240 MCM_GETTODAY = 0x100d, 2241 MCM_HITTEST = 0x100e, 2242 MCM_SETFIRSTDAYOFWEEK = 0x100f, 2243 MCM_GETFIRSTDAYOFWEEK = 0x1010, 2244 MCM_GETRANGE = 0x1011, 2245 MCM_SETRANGE = 0x1012, 2246 MCM_GETMONTHDELTA = 0x1013, 2247 MCM_SETMONTHDELTA = 0x1014, 2248 MCM_GETMAXTODAYWIDTH = 0x1015, 2249 MCM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT, 2250 MCM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT 2251 } 2252 2253 static if (_WIN32_WINNT >= 0x600) { 2254 enum { 2255 MCM_GETCURRENTVIEW = MCM_FIRST + 22, 2256 MCM_GETCALENDARCOUNT, 2257 MCM_GETCALENDARGRIDINFO, 2258 MCM_GETCALID = MCM_FIRST + 27, 2259 MCM_SETCALID, 2260 MCM_SIZERECTTOMIN, 2261 MCM_SETCALENDARBORDER, 2262 MCM_GETCALENDARBORDER, 2263 MCM_SETCURRENTVIEW, 2264 } 2265 } 2266 2267 enum { 2268 MCN_SELCHANGE = -749U, 2269 MCN_GETDAYSTATE = -747U, 2270 MCN_SELECT = -746U 2271 } 2272 2273 enum { 2274 ODT_HEADER = 100, 2275 ODT_TAB, 2276 ODT_LISTVIEW // = 102 2277 } 2278 2279 enum { 2280 SB_SETBKCOLOR = 0x2001 2281 } 2282 2283 static if (_WIN32_IE >= 0x300) { 2284 enum { 2285 SB_ISSIMPLE = 1038 2286 } 2287 2288 enum { 2289 MCSC_BACKGROUND, 2290 MCSC_TEXT, 2291 MCSC_TITLEBK, 2292 MCSC_TITLETEXT, 2293 MCSC_MONTHBK, 2294 MCSC_TRAILINGTEXT // = 5 2295 } 2296 } 2297 2298 static if (_WIN32_IE >= 0x400) { 2299 enum { 2300 MCHT_TITLE = 0x10000, 2301 MCHT_CALENDAR = 0x20000, 2302 MCHT_TODAYLINK = 0x30000, 2303 MCHT_NEXT = 0x1000000, 2304 MCHT_PREV = 0x2000000, 2305 MCHT_NOWHERE = 0x00, 2306 MCHT_TITLEBK = MCHT_TITLE, 2307 MCHT_TITLEMONTH = MCHT_TITLE | 0x0001, 2308 MCHT_TITLEYEAR = MCHT_TITLE | 0x0002, 2309 MCHT_TITLEBTNNEXT = MCHT_TITLE | MCHT_NEXT | 0x0003, 2310 MCHT_TITLEBTNPREV = MCHT_TITLE | MCHT_PREV | 0x0003, 2311 MCHT_CALENDARBK = MCHT_CALENDAR, 2312 MCHT_CALENDARDATE = MCHT_CALENDAR | 0x0001, 2313 MCHT_CALENDARDATENEXT = MCHT_CALENDARDATE | MCHT_NEXT, 2314 MCHT_CALENDARDATEPREV = MCHT_CALENDARDATE | MCHT_PREV, 2315 MCHT_CALENDARDAY = MCHT_CALENDAR | 0x0002, 2316 MCHT_CALENDARWEEKNUM = MCHT_CALENDAR | 0x0003 2317 } 2318 } 2319 2320 enum { 2321 RBS_TOOLTIPS = 256, 2322 RBS_VARHEIGHT = 512, 2323 RBS_BANDBORDERS = 1024, 2324 RBS_FIXEDORDER = 2048 2325 } 2326 2327 enum { 2328 RBIM_IMAGELIST = 1 2329 } 2330 2331 enum { 2332 RB_SETCOLORSCHEME = CCM_SETCOLORSCHEME, 2333 RB_GETCOLORSCHEME = CCM_GETCOLORSCHEME 2334 } 2335 2336 enum { 2337 RBBS_BREAK = 0x0001, 2338 RBBS_FIXEDSIZE = 0x0002, 2339 RBBS_CHILDEDGE = 0x0004, 2340 RBBS_HIDDEN = 0x0008, 2341 RBBS_NOVERT = 0x0010, 2342 RBBS_FIXEDBMP = 0x0020, 2343 RBBS_VARIABLEHEIGHT = 0x0040, 2344 RBBS_GRIPPERALWAYS = 0x0080, 2345 RBBS_NOGRIPPER = 0x0100 2346 } 2347 2348 static if (_WIN32_IE >= 0x500) { 2349 enum { 2350 RBBS_USECHEVRON = 0x0200 2351 } 2352 } 2353 2354 static if (_WIN32_IE >= 0x501) { 2355 enum { 2356 RBBS_HIDETITLE = 0x0400, 2357 RBBS_TOPALIGN = 0x0800 2358 } 2359 } 2360 2361 enum { 2362 RBBIM_STYLE = 1, 2363 RBBIM_COLORS = 2, 2364 RBBIM_TEXT = 4, 2365 RBBIM_IMAGE = 8, 2366 RBBIM_CHILD = 16, 2367 RBBIM_CHILDSIZE = 32, 2368 RBBIM_SIZE = 64, 2369 RBBIM_BACKGROUND = 128, 2370 RBBIM_ID = 256 2371 } 2372 2373 enum { 2374 RB_INSERTBANDA = WM_USER + 1, 2375 RB_DELETEBAND, 2376 RB_GETBARINFO, 2377 RB_SETBARINFO, // = WM_USER + 4 2378 RB_SETBANDINFOA = WM_USER + 6, 2379 RB_SETPARENT = WM_USER + 7, 2380 RB_INSERTBANDW = WM_USER + 10, 2381 RB_SETBANDINFOW, 2382 RB_GETBANDCOUNT, 2383 RB_GETROWCOUNT, 2384 RB_GETROWHEIGHT // = WM_USER + 14, 2385 } 2386 2387 enum { 2388 RBN_HEIGHTCHANGE = RBN_FIRST 2389 } 2390 2391 static if (_WIN32_IE >= 0x300) { 2392 enum { 2393 LVN_ODCACHEHINT = LVN_FIRST - 13, 2394 LVN_ODFINDITEMA = LVN_FIRST - 52, 2395 LVN_ODFINDITEMW = LVN_FIRST - 79, 2396 LVN_ITEMACTIVATE = LVN_FIRST - 14, 2397 LVN_ODSTATECHANGED = LVN_FIRST - 15 2398 } 2399 2400 version (Unicode) { 2401 enum { 2402 LVN_ODFINDITEM = LVN_ODFINDITEMW 2403 } 2404 } else { 2405 enum { 2406 LVN_ODFINDITEM = LVN_ODFINDITEMA 2407 } 2408 } 2409 } 2410 2411 static if (_WIN32_IE >= 0x400) { 2412 enum { 2413 SB_SETICON = 1039, 2414 SB_SETTIPTEXTA, 2415 SB_SETTIPTEXTW, 2416 SB_GETTIPTEXTA, 2417 SB_GETTIPTEXTW, 2418 SB_GETICON, // = 1044 2419 SB_SETUNICODEFORMAT = 0x2005, 2420 SB_GETUNICODEFORMAT = 0x2006 2421 } 2422 2423 enum { 2424 PGF_INVISIBLE = 0, 2425 PGF_NORMAL = 1, 2426 PGF_GRAYED = 2, 2427 PGF_DEPRESSED = 4, 2428 PGF_HOT = 8 2429 } 2430 2431 enum { 2432 PGB_TOPORLEFT, 2433 PGB_BOTTOMORRIGHT 2434 } 2435 2436 enum { 2437 PGF_SCROLLUP = 1, 2438 PGF_SCROLLDOWN = 2, 2439 PGF_SCROLLLEFT = 4, 2440 PGF_SCROLLRIGHT = 8 2441 } 2442 2443 enum { 2444 PGK_SHIFT = 1, 2445 PGK_CONTROL = 2, 2446 PGK_MENU = 4 2447 } 2448 2449 enum { 2450 PGF_CALCWIDTH = 1, 2451 PGF_CALCHEIGHT = 2 2452 } 2453 2454 enum { 2455 PGM_FIRST = 0x1400, 2456 PGM_SETCHILD = PGM_FIRST + 1, 2457 PGM_RECALCSIZE, 2458 PGM_FORWARDMOUSE, 2459 PGM_SETBKCOLOR, 2460 PGM_GETBKCOLOR, 2461 PGM_SETBORDER, 2462 PGM_GETBORDER, 2463 PGM_SETPOS, 2464 PGM_GETPOS, 2465 PGM_SETBUTTONSIZE, 2466 PGM_GETBUTTONSIZE, 2467 PGM_GETBUTTONSTATE, // = PGM_FIRST + 12 2468 PGM_GETDROPTARGET = CCM_GETDROPTARGET 2469 } 2470 2471 enum { 2472 RBS_REGISTERDROP = 4096, 2473 RBS_AUTOSIZE = 8192, 2474 RBS_VERTICALGRIPPER = 16384, 2475 RBS_DBLCLKTOGGLE = 32768 2476 } 2477 2478 enum { 2479 RBBIM_IDEALSIZE = 512, 2480 RBBIM_LPARAM = 1024, 2481 RBBIM_HEADERSIZE = 2048 2482 } 2483 2484 enum { 2485 RB_HITTEST = WM_USER + 8, 2486 RB_GETRECT = WM_USER + 9, 2487 RB_IDTOINDEX = WM_USER + 16, 2488 RB_GETTOOLTIPS, 2489 RB_SETTOOLTIPS, 2490 RB_SETBKCOLOR, 2491 RB_GETBKCOLOR, 2492 RB_SETTEXTCOLOR, 2493 RB_GETTEXTCOLOR, 2494 RB_SIZETORECT, 2495 RB_BEGINDRAG, 2496 RB_ENDDRAG, 2497 RB_DRAGMOVE, 2498 RB_GETBARHEIGHT, 2499 RB_GETBANDINFOW, 2500 RB_GETBANDINFOA, 2501 RB_MINIMIZEBAND, 2502 RB_MAXIMIZEBAND, // = WM_USER + 31 2503 RB_GETDROPTARGET = CCM_GETDROPTARGET, 2504 RB_GETBANDBORDERS = WM_USER + 34, 2505 RB_SHOWBAND = WM_USER + 35, 2506 RB_SETPALETTE = WM_USER + 37, 2507 RB_GETPALETTE = WM_USER + 38, 2508 RB_MOVEBAND = WM_USER + 39, 2509 RB_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT, 2510 RB_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT 2511 } 2512 2513 enum { 2514 RBN_GETOBJECT = RBN_FIRST - 1, 2515 RBN_LAYOUTCHANGED = RBN_FIRST - 2, 2516 RBN_AUTOSIZE = RBN_FIRST - 3, 2517 RBN_BEGINDRAG = RBN_FIRST - 4, 2518 RBN_ENDDRAG = RBN_FIRST - 5, 2519 RBN_DELETINGBAND = RBN_FIRST - 6, 2520 RBN_DELETEDBAND = RBN_FIRST - 7, 2521 RBN_CHILDSIZE = RBN_FIRST - 8 2522 } 2523 2524 enum { 2525 RBNM_ID = 1, 2526 RBNM_STYLE = 2, 2527 RBNM_LPARAM = 4 2528 } 2529 2530 enum { 2531 RBHT_NOWHERE = 1, 2532 RBHT_CAPTION, 2533 RBHT_CLIENT, 2534 RBHT_GRABBER 2535 } 2536 2537 version (Unicode) { 2538 alias SB_SETTIPTEXTW SB_SETTIPTEXT; 2539 alias SB_GETTIPTEXTW SB_GETTIPTEXT; 2540 alias RB_GETBANDINFOW RB_GETBANDINFO; 2541 } else { 2542 alias SB_SETTIPTEXTA SB_SETTIPTEXT; 2543 alias SB_GETTIPTEXTA SB_GETTIPTEXT; 2544 alias RB_GETBANDINFOA RB_GETBANDINFO; 2545 } 2546 } else { 2547 enum { 2548 RB_GETBANDINFO = WM_USER + 5 2549 } 2550 } 2551 2552 static if (_WIN32_IE >= 0x500) { 2553 enum { 2554 RB_PUSHCHEVRON = WM_USER + 43, 2555 } 2556 } 2557 2558 static if (_WIN32_IE >= 0x600) { 2559 enum { 2560 RB_SETEXTENDEDSTYLE = WM_USER + 41, 2561 RB_GETEXTENDEDSTYLE = WM_USER + 42, 2562 } 2563 } 2564 2565 static if (_WIN32_WINNT >= 0x500) { 2566 enum { 2567 RB_SETBANDWIDTH = WM_USER + 44, 2568 } 2569 } 2570 2571 static if (_WIN32_WINNT >= 0x501) { 2572 enum { 2573 ECM_FIRST = 0x1500, 2574 BCM_FIRST = 0x1600, 2575 2576 BCM_GETIDEALSIZE = BCM_FIRST + 0x0001, 2577 BCM_SETIMAGELIST = BCM_FIRST + 0x0002, 2578 BCM_GETIMAGELIST = BCM_FIRST + 0x0003, 2579 BCM_SETTEXTMARGIN = BCM_FIRST + 0x0004, 2580 BCM_GETTEXTMARGIN = BCM_FIRST + 0x0005, 2581 2582 BCN_HOTITEMCHANGE = BCN_FIRST + 0x0001, 2583 } 2584 2585 struct NMBCHOTITEM { 2586 NMHDR hdr; 2587 DWORD dwFlags; 2588 } 2589 alias NMBCHOTITEM* LPNMBCHOTITEM; 2590 } 2591 2592 static if (_WIN32_WINNT >= 0x600) { 2593 enum { 2594 BST_DROPDOWNPUSHED = 0x0400, 2595 2596 BS_SPLITBUTTON = 0x0000_000C, 2597 BS_DEFSPLITBUTTON = 0x0000_000D, 2598 BS_COMMANDLINK = 0x0000_000E, 2599 BS_DEFCOMMANDLINK = 0x0000_000F, 2600 2601 BCSIF_GLYPH = 0x0001, 2602 BCSIF_IMAGE = 0x0002, 2603 BCSIF_STYLE = 0x0004, 2604 BCSIF_SIZE = 0x0008, 2605 2606 BCSS_NOSPLIT = 0x0001, 2607 BCSS_STRETCH = 0x0002, 2608 BCSS_ALIGNLEFT = 0x0004, 2609 BCSS_IMAGE = 0x0008, 2610 2611 BCM_SETDROPDOWNSTATE = BCM_FIRST + 0x0006, 2612 BCM_SETSPLITINFO = BCM_FIRST + 0x0007, 2613 BCM_GETSPLITINFO = BCM_FIRST + 0x0008, 2614 BCM_SETNOTE = BCM_FIRST + 0x0009, 2615 BCM_GETNOTE = BCM_FIRST + 0x000A, 2616 BCM_GETNOTELENGTH = BCM_FIRST + 0x000B, 2617 BCM_SETSHIELD = BCM_FIRST + 0x000C, 2618 2619 BCN_DROPDOWN = BCN_FIRST + 0x0002, 2620 } 2621 2622 enum HIMAGELIST BCCL_NOGLYPH = cast(HIMAGELIST)-1; 2623 2624 struct BUTTON_SPLITINFO 2625 { 2626 UINT mask; 2627 HIMAGELIST himlGlyph; 2628 UINT uSplitStyle; 2629 SIZE size; 2630 } 2631 alias BUTTON_SPLITINFO* PBUTTON_SPLITINFO; 2632 } 2633 2634 enum { 2635 CBEM_INSERTITEMA = WM_USER + 1, 2636 CBEM_SETIMAGELIST, 2637 CBEM_GETIMAGELIST, 2638 CBEM_GETITEMA, 2639 CBEM_SETITEMA, 2640 CBEM_GETCOMBOCONTROL, 2641 CBEM_GETEDITCONTROL, 2642 CBEM_SETEXSTYLE, 2643 CBEM_GETEXSTYLE, // = WM_USER + 9) 2644 CBEM_DELETEITEM = CB_DELETESTRING 2645 } 2646 2647 static if (_WIN32_IE >= 0x400) { 2648 enum { 2649 CBEM_SETEXTENDEDSTYLE = WM_USER + 14, 2650 CBEM_GETEXTENDEDSTYLE = WM_USER + 9, 2651 CBEM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT, 2652 CBEM_GETUNICODEFORMAT = CCM_GETUNICODEFORMAT 2653 } 2654 } 2655 2656 enum { 2657 CBEM_HASEDITCHANGED = WM_USER + 10, 2658 CBEM_INSERTITEMW = WM_USER + 11, 2659 CBEM_SETITEMW = WM_USER + 12, 2660 CBEM_GETITEMW = WM_USER + 13 2661 } 2662 2663 static if (_WIN32_WINNT >= 0x501) 2664 { 2665 enum { 2666 CBEM_SETWINDOWTHEME = CCM_SETWINDOWTHEME 2667 } 2668 } 2669 2670 enum { 2671 DA_LAST = 0x7fffffff 2672 } 2673 2674 enum { 2675 DPA_APPEND = 0x7fffffff, 2676 DPA_ERR = -1 2677 } 2678 2679 enum { 2680 DSA_APPEND = 0x7fffffff, 2681 DSA_ERR = -1 2682 } 2683 2684 enum { 2685 DPAS_SORTED = 1, 2686 DPAS_INSERTBEFORE = 2, 2687 DPAS_INSERTAFTER = 4 2688 } 2689 2690 static if (_WIN32_IE >= 0x400) { 2691 enum { 2692 WSB_PROP_CYVSCROLL = 1, 2693 WSB_PROP_CXHSCROLL = 2, 2694 WSB_PROP_CYHSCROLL = 4, 2695 WSB_PROP_CXVSCROLL = 8, 2696 WSB_PROP_CXHTHUMB = 16, 2697 WSB_PROP_CYVTHUMB = 32, 2698 WSB_PROP_VBKGCOLOR = 64, 2699 WSB_PROP_HBKGCOLOR = 128, 2700 WSB_PROP_VSTYLE = 256, 2701 WSB_PROP_HSTYLE = 512, 2702 WSB_PROP_WINSTYLE = 1024, 2703 WSB_PROP_PALETTE = 2048, 2704 WSB_PROP_MASK = 0xfff, 2705 FSB_FLAT_MODE = 2, 2706 FSB_ENCARTA_MODE = 1, 2707 FSB_REGULAR_MODE = 0 2708 } 2709 } 2710 2711 static if (_WIN32_WINNT >= 0x501) { 2712 enum { 2713 LIF_ITEMINDEX = 1, 2714 LIF_STATE = 2, 2715 LIF_ITEMID = 4, 2716 LIF_URL = 8 2717 } 2718 2719 enum { 2720 LIS_FOCUSED = 1, 2721 LIS_ENABLED = 2, 2722 LIS_VISITED = 4 2723 } 2724 2725 enum { 2726 LM_HITTEST = WM_USER + 768, 2727 LM_GETIDEALHEIGHT, 2728 LM_SETITEM, 2729 LM_GETITEM, // = WM_USER + 771 2730 LM_GETIDEALSIZE = LM_GETIDEALHEIGHT, 2731 } 2732 2733 enum size_t MAX_LINKID_TEXT = 48; 2734 enum size_t L_MAX_URL_LENGTH = 2084; 2735 } 2736 2737 2738 struct TBMETRICS { 2739 UINT cbSize = TBMETRICS.sizeof; 2740 DWORD dwMask; 2741 int cxPad; 2742 int cyPad; 2743 int cxBarPad; 2744 int cyBarPad; 2745 int cxButtonSpacing; 2746 int cyButtonSpacing; 2747 } 2748 alias TBMETRICS* LPTBMETRICS; 2749 2750 static if (_WIN32_WINNT >= 0x501) { 2751 struct TTGETTITLE { 2752 DWORD dwSize = TTGETTITLE.sizeof; 2753 UINT uTitleBitmap; 2754 UINT cch; 2755 WCHAR* pszTitle; 2756 } 2757 alias TTGETTITLE* PTTGETTITLE; 2758 } 2759 2760 static if (_WIN32_WINNT >= 0x600) { 2761 struct MCGRIDINFO { 2762 UINT cbSize; 2763 DWORD dwPart; 2764 DWORD dwFlags; 2765 int iCalendar; 2766 int iRow; 2767 int iCol; 2768 BOOL bSelected; 2769 SYSTEMTIME stStart; 2770 SYSTEMTIME stEnd; 2771 RECT rc; 2772 PWSTR pszName; 2773 size_t cchName; 2774 } 2775 alias MCGRIDINFO* PMCGRIDINFO; 2776 2777 struct DATETIMEPICKERINFO 2778 { 2779 DWORD cbSize; 2780 RECT rcCheck; 2781 DWORD stateCheck; 2782 RECT rcButton; 2783 DWORD stateButton; 2784 HWND hwndEdit; 2785 HWND hwndUD; 2786 HWND hwndDropDown; 2787 } 2788 alias DATETIMEPICKERINFO* LPDATETIMEPICKERINFO; 2789 } 2790 2791 struct COMBOBOXEXITEMA { 2792 UINT mask; 2793 INT_PTR iItem; 2794 LPSTR pszText; 2795 int cchTextMax; 2796 int iImage; 2797 int iSelectedImage; 2798 int iOverlay; 2799 int iIndent; 2800 LPARAM lParam; 2801 } 2802 alias COMBOBOXEXITEMA* PCOMBOBOXEXITEMA; 2803 alias const(COMBOBOXEXITEMA)* PCCOMBOEXITEMA; 2804 2805 struct COMBOBOXEXITEMW { 2806 UINT mask; 2807 INT_PTR iItem; 2808 LPWSTR pszText; 2809 int cchTextMax; 2810 int iImage; 2811 int iSelectedImage; 2812 int iOverlay; 2813 int iIndent; 2814 LPARAM lParam; 2815 } 2816 alias COMBOBOXEXITEMW* PCOMBOBOXEXITEMW; 2817 alias const(COMBOBOXEXITEMW)* PCCOMBOEXITEMW; 2818 2819 static if (_WIN32_IE >= 0x400) { 2820 struct NMCOMBOBOXEXA { 2821 NMHDR hdr; 2822 COMBOBOXEXITEMA ceItem; 2823 } 2824 alias NMCOMBOBOXEXA* PNMCOMBOBOXEXA; 2825 2826 struct NMCOMBOBOXEXW { 2827 NMHDR hdr; 2828 COMBOBOXEXITEMW ceItem; 2829 } 2830 alias NMCOMBOBOXEXW* PNMCOMBOBOXEXW; 2831 2832 struct NMCBEDRAGBEGINW { 2833 NMHDR hdr; 2834 int iItemid; 2835 WCHAR[CBEMAXSTRLEN] szText = 0; 2836 } 2837 alias NMCBEDRAGBEGINW* LPNMCBEDRAGBEGINW, PNMCBEDRAGBEGINW; 2838 2839 struct NMCBEDRAGBEGINA { 2840 NMHDR hdr; 2841 int iItemid; 2842 char[CBEMAXSTRLEN] szText = 0; 2843 } 2844 alias NMCBEDRAGBEGINA* LPNMCBEDRAGBEGINA, PNMCBEDRAGBEGINA; 2845 2846 struct NMIPADDRESS { 2847 NMHDR hdr; 2848 int iField; 2849 int iValue; 2850 } 2851 alias NMIPADDRESS* LPNMIPADDRESS; 2852 2853 align (1) 2854 struct NMLVKEYDOWN { 2855 align (1): 2856 NMHDR hdr; 2857 WORD wVKey; 2858 UINT flags; 2859 } 2860 alias NMLVKEYDOWN* LPNMLVKEYDOWN; 2861 2862 struct NMPGCALCSIZE { 2863 NMHDR hdr; 2864 DWORD dwFlag; 2865 int iWidth; 2866 int iHeight; 2867 } 2868 alias NMPGCALCSIZE* LPNMPGCALCSIZE; 2869 2870 align (1) 2871 struct NMPGSCROLL { 2872 align (1): 2873 NMHDR hdr; 2874 WORD fwKeys; // Note: this should be WORD if MSDN document says wrong 2875 RECT rcParent; 2876 int iDir; 2877 int iXpos; 2878 int iYpos; 2879 int iScroll; 2880 } 2881 alias NMPGSCROLL* LPNMPGSCROLL; 2882 2883 struct NMSELCHANGE { 2884 NMHDR nmhdr; 2885 SYSTEMTIME stSelStart; 2886 SYSTEMTIME stSelEnd; 2887 } 2888 alias NMSELCHANGE* LPNMSELCHANGE; 2889 2890 struct NMTBHOTITEM { 2891 NMHDR hdr; 2892 int idOld; 2893 int idNew; 2894 DWORD dwFlags; 2895 } 2896 alias NMTBHOTITEM* LPNMTBHOTITEM; 2897 2898 struct NMTBDISPINFOA { 2899 NMHDR hdr; 2900 DWORD dwMask; 2901 int idCommand; 2902 DWORD_PTR lParam; 2903 int iImage; 2904 LPSTR pszText; 2905 int cchText; 2906 } 2907 alias NMTBDISPINFOA* LPNMTBDISPINFOA; 2908 2909 struct NMTBDISPINFOW { 2910 NMHDR hdr; 2911 DWORD dwMask; 2912 int idCommand; 2913 DWORD_PTR lParam; 2914 int iImage; 2915 LPWSTR pszText; 2916 int cchText; 2917 } 2918 alias NMTBDISPINFOW* LPNMTBDISPINFOW; 2919 2920 struct NMTBGETINFOTIPA { 2921 NMHDR hdr; 2922 LPSTR pszText; 2923 int cchTextMax; 2924 int iItem; 2925 LPARAM lParam; 2926 } 2927 alias NMTBGETINFOTIPA* LPNMTBGETINFOTIPA; 2928 2929 struct NMTBGETINFOTIPW { 2930 NMHDR hdr; 2931 LPWSTR pszText; 2932 int cchTextMax; 2933 int iItem; 2934 LPARAM lParam; 2935 } 2936 alias NMTBGETINFOTIPW* LPNMTBGETINFOTIPW; 2937 2938 struct NMMOUSE { 2939 NMHDR hdr; 2940 DWORD_PTR dwItemSpec; 2941 DWORD_PTR dwItemData; 2942 POINT pt; 2943 LPARAM dwHitInfo; 2944 } 2945 alias NMMOUSE* LPNMMOUSE; 2946 } 2947 2948 static if (_WIN32_IE >= 0x401) { 2949 struct NMTOOLTIPSCREATED { 2950 NMHDR hdr; 2951 HWND hwndToolTips; 2952 } 2953 alias NMTOOLTIPSCREATED* LPNMTOOLTIPSCREATED; 2954 } 2955 2956 struct NMDATETIMECHANGE { 2957 NMHDR nmhdr; 2958 DWORD dwFlags; 2959 SYSTEMTIME st; 2960 } 2961 alias NMDATETIMECHANGE* LPNMDATETIMECHANGE; 2962 2963 struct NMCBEENDEDITW { 2964 NMHDR hdr; 2965 BOOL fChanged; 2966 int iNewSelection; 2967 WCHAR[CBEMAXSTRLEN] szText = 0; 2968 int iWhy; 2969 } 2970 alias NMCBEENDEDITW* LPNMCBEENDEDITW, PNMCBEENDEDITW; 2971 2972 struct NMCBEENDEDITA { 2973 NMHDR hdr; 2974 BOOL fChanged; 2975 int iNewSelection; 2976 char[CBEMAXSTRLEN] szText = 0; 2977 int iWhy; 2978 } 2979 alias NMCBEENDEDITA* LPNMCBEENDEDITA, PNMCBEENDEDITA; 2980 2981 struct COLORMAP { 2982 COLORREF from; 2983 COLORREF to; 2984 } 2985 alias COLORMAP* LPCOLORMAP; 2986 2987 struct DRAGLISTINFO { 2988 UINT uNotification; 2989 HWND hWnd; 2990 POINT ptCursor; 2991 } 2992 alias DRAGLISTINFO* LPDRAGLISTINFO; 2993 2994 struct TBBUTTON { 2995 int iBitmap; 2996 int idCommand; 2997 BYTE fsState; 2998 BYTE fsStyle; 2999 version (Win64){ 3000 BYTE[6] bReserved; 3001 } else { 3002 BYTE[2] bReserved; 3003 } 3004 DWORD_PTR dwData; 3005 INT_PTR iString; 3006 } 3007 alias TBBUTTON* PTBBUTTON, LPTBBUTTON; 3008 alias const(TBBUTTON)* LPCTBBUTTON; 3009 3010 static if (_WIN32_IE >= 0x400) { 3011 struct TBBUTTONINFOA { 3012 UINT cbSize = TBBUTTONINFOA.sizeof; 3013 DWORD dwMask; 3014 int idCommand; 3015 int iImage; 3016 BYTE fsState; 3017 BYTE fsStyle; 3018 WORD cx; 3019 DWORD_PTR lParam; 3020 LPSTR pszText; 3021 int cchText; 3022 } 3023 alias TBBUTTONINFOA* LPTBBUTTONINFOA; 3024 3025 struct TBBUTTONINFOW { 3026 UINT cbSize = TBBUTTONINFOW.sizeof; 3027 DWORD dwMask; 3028 int idCommand; 3029 int iImage; 3030 BYTE fsState; 3031 BYTE fsStyle; 3032 WORD cx; 3033 DWORD_PTR lParam; 3034 LPWSTR pszText; 3035 int cchText; 3036 } 3037 alias TBBUTTONINFOW* LPTBBUTTONINFOW; 3038 3039 struct TBINSERTMARK { 3040 int iButton; 3041 DWORD dwFlags; 3042 } 3043 alias TBINSERTMARK* LPTBINSERTMARK; 3044 3045 struct LVBKIMAGEA { 3046 ULONG ulFlags; 3047 HBITMAP hbm; 3048 LPSTR pszImage; 3049 UINT cchImageMax; 3050 int xOffsetPercent; 3051 int yOffsetPercent; 3052 } 3053 alias LVBKIMAGEA* LPLVBKIMAGEA; 3054 3055 struct LVBKIMAGEW { 3056 ULONG ulFlags; 3057 HBITMAP hbm; 3058 LPWSTR pszImage; 3059 UINT cchImageMax; 3060 int xOffsetPercent; 3061 int yOffsetPercent; 3062 } 3063 alias LVBKIMAGEW* LPLVBKIMAGEW; 3064 } 3065 3066 /*struct TBNOTIFY { 3067 NMHDR hdr; 3068 int iItem; 3069 TBBUTTON tbButton; 3070 int cchText; 3071 LPTSTR pszText; 3072 } 3073 alias TBNOTIFY* LPTBNOTIFY; 3074 */ 3075 3076 /*struct TBSAVEPARAMS { 3077 HKEY hkr; 3078 LPCTSTR pszSubKey; 3079 LPCTSTR pszValueName; 3080 }*/ 3081 3082 struct IMAGEINFO { 3083 HBITMAP hbmImage; 3084 HBITMAP hbmMask; 3085 int Unused1; 3086 int Unused2; 3087 RECT rcImage; 3088 } 3089 alias IMAGEINFO* LPIMAGEINFO; 3090 3091 static if (_WIN32_IE >= 0x500) { 3092 struct HDITEMA { 3093 UINT mask; 3094 int cxy; 3095 LPSTR pszText; 3096 HBITMAP hbm; 3097 int cchTextMax; 3098 int fmt; 3099 LPARAM lParam; 3100 int iImage; 3101 int iOrder; 3102 UINT type; 3103 LPVOID pvFilter; 3104 } 3105 3106 struct HDITEMW { 3107 UINT mask; 3108 int cxy; 3109 LPWSTR pszText; 3110 HBITMAP hbm; 3111 int cchTextMax; 3112 int fmt; 3113 LPARAM lParam; 3114 int iImage; 3115 int iOrder; 3116 UINT type; 3117 LPVOID pvFilter; 3118 } 3119 } else static if (_WIN32_IE >= 0x300) { 3120 struct HDITEMA { 3121 UINT mask; 3122 int cxy; 3123 LPSTR pszText; 3124 HBITMAP hbm; 3125 int cchTextMax; 3126 int fmt; 3127 LPARAM lParam; 3128 int iImage; 3129 int iOrder; 3130 } 3131 3132 struct HDITEMW { 3133 UINT mask; 3134 int cxy; 3135 LPWSTR pszText; 3136 HBITMAP hbm; 3137 int cchTextMax; 3138 int fmt; 3139 LPARAM lParam; 3140 int iImage; 3141 int iOrder; 3142 } 3143 } else { 3144 struct HDITEMA { 3145 UINT mask; 3146 int cxy; 3147 LPSTR pszText; 3148 HBITMAP hbm; 3149 int cchTextMax; 3150 int fmt; 3151 LPARAM lParam; 3152 } 3153 3154 struct HDITEMW { 3155 UINT mask; 3156 int cxy; 3157 LPWSTR pszText; 3158 HBITMAP hbm; 3159 int cchTextMax; 3160 int fmt; 3161 LPARAM lParam; 3162 } 3163 } 3164 alias HDITEMA* LPHDITEMA; 3165 alias HDITEMW* LPHDITEMW; 3166 3167 deprecated { 3168 alias HDITEMA HD_ITEMA; 3169 alias HDITEMW HD_ITEMW; 3170 //alias HDITEM HD_ITEM; fixme 3171 } 3172 3173 struct HD_LAYOUT { 3174 RECT* prc; 3175 WINDOWPOS* pwpos; 3176 } 3177 alias HD_LAYOUT* LPHDLAYOUT; 3178 deprecated alias HD_LAYOUT HDLAYOUT; 3179 3180 struct HD_HITTESTINFO { 3181 POINT pt; 3182 UINT flags; 3183 int iItem; 3184 } 3185 alias HD_HITTESTINFO* LPHDHITTESTINFO; 3186 3187 struct HD_NOTIFYA { 3188 NMHDR hdr; 3189 int iItem; 3190 int iButton; 3191 HDITEMA* pitem; 3192 } 3193 3194 struct HD_NOTIFYW { 3195 NMHDR hdr; 3196 int iItem; 3197 int iButton; 3198 HDITEMW* pitem; 3199 } 3200 3201 /* FIXME: NMHEADER structure (base for all events of the comctl controls) 3202 is the same as HD_NOTIFY depending on the value of _WIN32_IE macro. 3203 I'm defining both for now. */ 3204 struct NMHEADERA { 3205 NMHDR hdr; 3206 int iItem; 3207 int iButton; 3208 HDITEMA* pitem; 3209 } 3210 alias NMHEADERA* LPNMHEADERA; 3211 3212 struct NMHEADERW { 3213 NMHDR hdr; 3214 int iItem; 3215 int iButton; 3216 HDITEMW* pitem; 3217 } 3218 alias NMHEADERW* LPNMHEADERW; 3219 3220 version (Unicode) { 3221 alias NMHEADERW NMHEADER; 3222 alias LPNMHEADERW LPNMHEADER; 3223 } else { 3224 alias NMHEADERA NMHEADER; 3225 alias LPNMHEADERA LPNMHEADER; 3226 } 3227 // End FIXME 3228 3229 struct NMHDDISPINFOA { 3230 NMHDR hdr; 3231 int iItem; 3232 UINT mask; 3233 LPSTR pszText; 3234 int cchTextMax; 3235 int iImage; 3236 LPARAM lParam; 3237 } 3238 alias NMHDDISPINFOA* LPNMHDDISPINFOA; 3239 3240 struct NMHDDISPINFOW { 3241 NMHDR hdr; 3242 int iItem; 3243 UINT mask; 3244 LPWSTR pszText; 3245 int cchTextMax; 3246 int iImage; 3247 LPARAM lParam; 3248 } 3249 alias NMHDDISPINFOW* LPNMHDDISPINFOW; 3250 3251 struct NMCUSTOMDRAW { 3252 NMHDR hdr; 3253 DWORD dwDrawStage; 3254 HDC hdc; 3255 RECT rc; 3256 DWORD_PTR dwItemSpec; 3257 UINT uItemState; 3258 LPARAM lItemlParam; 3259 } 3260 alias NMCUSTOMDRAW* LPNMCUSTOMDRAW; 3261 3262 static if (_WIN32_IE >= 0x400) { 3263 struct NMLVCUSTOMDRAW { 3264 NMCUSTOMDRAW nmcd; 3265 COLORREF clrText; 3266 COLORREF clrTextBk; 3267 int iSubItem; 3268 } 3269 } else { 3270 struct NMLVCUSTOMDRAW { 3271 NMCUSTOMDRAW nmcd; 3272 COLORREF clrText; 3273 COLORREF clrTextBk; 3274 } 3275 } 3276 alias NMLVCUSTOMDRAW* LPNMLVCUSTOMDRAW; 3277 3278 static if (_WIN32_IE >= 0x400) { 3279 struct NMLVGETINFOTIPA { 3280 NMHDR hdr; 3281 DWORD dwFlags; 3282 LPSTR pszText; 3283 int cchTextMax; 3284 int iItem; 3285 int iSubItem; 3286 LPARAM lParam; 3287 } 3288 alias NMLVGETINFOTIPA* LPNMLVGETINFOTIPA; 3289 3290 struct NMLVGETINFOTIPW { 3291 NMHDR hdr; 3292 DWORD dwFlags; 3293 LPWSTR pszText; 3294 int cchTextMax; 3295 int iItem; 3296 int iSubItem; 3297 LPARAM lParam; 3298 } 3299 alias NMLVGETINFOTIPW* LPNMLVGETINFOTIPW; 3300 } 3301 3302 static if (_WIN32_IE >= 0x400) { 3303 struct NMTVCUSTOMDRAW { 3304 NMCUSTOMDRAW nmcd; 3305 COLORREF clrText; 3306 COLORREF clrTextBk; 3307 int iLevel; 3308 } 3309 } else { 3310 struct NMTVCUSTOMDRAW { 3311 NMCUSTOMDRAW nmcd; 3312 COLORREF clrText; 3313 COLORREF clrTextBk; 3314 } 3315 } 3316 alias NMTVCUSTOMDRAW* LPNMTVCUSTOMDRAW; 3317 3318 static if (_WIN32_IE >= 0x400) { 3319 static if (_WIN32_WINNT >= 0x501) { 3320 struct NMTBCUSTOMDRAW { 3321 NMCUSTOMDRAW nmcd; 3322 HBRUSH hbrMonoDither; 3323 HBRUSH hbrLines; 3324 HPEN hpenLines; 3325 COLORREF clrText; 3326 COLORREF clrMark; 3327 COLORREF clrTextHighlight; 3328 COLORREF clrBtnFace; 3329 COLORREF clrBtnHighlight; 3330 COLORREF clrHighlightHotTrack; 3331 RECT rcText; 3332 int nStringBkMode; 3333 int nHLStringBkMode; 3334 int iListGap; 3335 } 3336 } else { 3337 struct NMTBCUSTOMDRAW { 3338 NMCUSTOMDRAW nmcd; 3339 HBRUSH hbrMonoDither; 3340 HBRUSH hbrLines; 3341 HPEN hpenLines; 3342 COLORREF clrText; 3343 COLORREF clrMark; 3344 COLORREF clrTextHighlight; 3345 COLORREF clrBtnFace; 3346 COLORREF clrBtnHighlight; 3347 COLORREF clrHighlightHotTrack; 3348 RECT rcText; 3349 int nStringBkMode; 3350 int nHLStringBkMode; 3351 } 3352 } 3353 alias NMTBCUSTOMDRAW* LPNMTBCUSTOMDRAW; 3354 3355 struct NMITEMACTIVATE { 3356 NMHDR hdr; 3357 int iItem; 3358 int iSubItem; 3359 UINT uNewState; 3360 UINT uOldState; 3361 UINT uChanged; 3362 POINT ptAction; 3363 LPARAM lParam; 3364 UINT uKeyFlags; 3365 } 3366 alias NMITEMACTIVATE* LPNMITEMACTIVATE; 3367 } 3368 3369 struct TBADDBITMAP { 3370 HINSTANCE hInst; 3371 UINT_PTR nID; 3372 } 3373 alias TBADDBITMAP* LPTBADDBITMAP; 3374 3375 struct TBSAVEPARAMSA { 3376 HKEY hkr; 3377 LPCSTR pszSubKey; 3378 LPCSTR pszValueName; 3379 } 3380 3381 struct TBSAVEPARAMSW { 3382 HKEY hkr; 3383 LPCWSTR pszSubKey; 3384 LPCWSTR pszValueName; 3385 } 3386 3387 struct TBREPLACEBITMAP { 3388 HINSTANCE hInstOld; 3389 UINT_PTR nIDOld; 3390 HINSTANCE hInstNew; 3391 UINT_PTR nIDNew; 3392 int nButtons; 3393 } 3394 alias TBREPLACEBITMAP* LPTBREPLACEBITMAP; 3395 3396 static if (_WIN32_IE >= 0x500) { 3397 struct NMTOOLBARA { 3398 NMHDR hdr; 3399 int iItem; 3400 TBBUTTON tbButton; 3401 int cchText; 3402 LPSTR pszText; 3403 RECT rcButton; 3404 } 3405 3406 struct NMTOOLBARW { 3407 NMHDR hdr; 3408 int iItem; 3409 TBBUTTON tbButton; 3410 int cchText; 3411 LPWSTR pszText; 3412 RECT rcButton; 3413 } 3414 } else { 3415 struct NMTOOLBARA { 3416 NMHDR hdr; 3417 int iItem; 3418 TBBUTTON tbButton; 3419 int cchText; 3420 LPSTR pszText; 3421 } 3422 3423 struct NMTOOLBARW { 3424 NMHDR hdr; 3425 int iItem; 3426 TBBUTTON tbButton; 3427 int cchText; 3428 LPWSTR pszText; 3429 } 3430 } 3431 alias NMTOOLBARA* LPNMTOOLBARA; 3432 alias NMTOOLBARW* LPNMTOOLBARW; 3433 3434 alias NMTOOLBARA TBNOTIFYA; 3435 alias LPNMTOOLBARA LPTBNOTIFYA; 3436 3437 alias NMTOOLBARW TBNOTIFYW; 3438 alias LPNMTOOLBARW LPTBNOTIFYW; 3439 3440 static if (_WIN32_WINNT >= 0x501) { 3441 struct TOOLINFOA { 3442 UINT cbSize = TOOLINFOA.sizeof; 3443 UINT uFlags; 3444 HWND hwnd; 3445 UINT_PTR uId; 3446 RECT rect; 3447 HINSTANCE hinst; 3448 LPSTR lpszText; 3449 LPARAM lParam; 3450 void* lpReserved; 3451 } 3452 3453 struct TOOLINFOW { 3454 UINT cbSize = TOOLINFOW.sizeof; 3455 UINT uFlags; 3456 HWND hwnd; 3457 UINT_PTR uId; 3458 RECT rect; 3459 HINSTANCE hinst; 3460 LPWSTR lpszText; 3461 LPARAM lParam; 3462 void* lpReserved; 3463 } 3464 3465 enum size_t 3466 TTTOOLINFOA_V1_SIZE = TOOLINFOA.lParam.offsetof, 3467 TTTOOLINFOW_V1_SIZE = TOOLINFOW.lParam.offsetof, 3468 TTTOOLINFOA_V2_SIZE = TOOLINFOA.lpReserved.offsetof, 3469 TTTOOLINFOW_V2_SIZE = TOOLINFOW.lpReserved.offsetof, 3470 TTTOOLINFOA_V3_SIZE = TOOLINFOA.sizeof, 3471 TTTOOLINFOW_V3_SIZE = TOOLINFOW.sizeof; 3472 } else static if (_WIN32_IE >= 0x300) { 3473 struct TOOLINFOA { 3474 UINT cbSize = TOOLINFOA.sizeof; 3475 UINT uFlags; 3476 HWND hwnd; 3477 UINT uId; 3478 RECT rect; 3479 HINSTANCE hinst; 3480 LPSTR lpszText; 3481 LPARAM lParam; 3482 } 3483 3484 struct TOOLINFOW { 3485 UINT cbSize = TOOLINFOW.sizeof; 3486 UINT uFlags; 3487 HWND hwnd; 3488 UINT uId; 3489 RECT rect; 3490 HINSTANCE hinst; 3491 LPWSTR lpszText; 3492 LPARAM lParam; 3493 } 3494 3495 enum size_t 3496 TTTOOLINFOA_V1_SIZE = TOOLINFOA.lParam.offsetof, 3497 TTTOOLINFOW_V1_SIZE = TOOLINFOW.lParam.offsetof, 3498 TTTOOLINFOA_V2_SIZE = TOOLINFOA.sizeof, 3499 TTTOOLINFOW_V2_SIZE = TOOLINFOW.sizeof; 3500 } else { 3501 struct TOOLINFOA { 3502 UINT cbSize = TOOLINFOA.sizeof; 3503 UINT uFlags; 3504 HWND hwnd; 3505 UINT uId; 3506 RECT rect; 3507 HINSTANCE hinst; 3508 LPSTR lpszText; 3509 } 3510 3511 struct TOOLINFOW { 3512 UINT cbSize = TOOLINFOW.sizeof; 3513 UINT uFlags; 3514 HWND hwnd; 3515 UINT uId; 3516 RECT rect; 3517 HINSTANCE hinst; 3518 LPWSTR lpszText; 3519 } 3520 3521 enum size_t 3522 TTTOOLINFOA_V1_SIZE = TOOLINFOA.sizeof, 3523 TTTOOLINFOW_V1_SIZE = TOOLINFOW.sizeof; 3524 } 3525 alias TOOLINFOA TTTOOLINFOA; 3526 alias TOOLINFOW TTTOOLINFOW; 3527 alias TTTOOLINFOA* LPTTTOOLINFOA, PTOOLINFOA, LPTOOLINFOA; 3528 alias TTTOOLINFOW* LPTTTOOLINFOW, PTOOLINFOW, LPTOOLINFOW; 3529 3530 struct TTHITTESTINFOA { 3531 HWND hwnd; 3532 POINT pt; 3533 TOOLINFOA ti; 3534 } 3535 alias TTHITTESTINFOA* LPTTHITTESTINFOA, LPHITTESTINFOA; 3536 3537 struct TTHITTESTINFOW { 3538 HWND hwnd; 3539 POINT pt; 3540 TOOLINFOW ti; 3541 } 3542 alias TTHITTESTINFOW* LPTTHITTESTINFOW, LPHITTESTINFOW; 3543 3544 static if (_WIN32_IE >= 0x300) { 3545 struct NMTTDISPINFOA { 3546 NMHDR hdr; 3547 LPSTR lpszText; 3548 char[80] szText = 0; 3549 HINSTANCE hinst; 3550 UINT uFlags; 3551 LPARAM lParam; 3552 } 3553 3554 struct NMTTDISPINFOW { 3555 NMHDR hdr; 3556 LPWSTR lpszText; 3557 WCHAR[80] szText = 0; 3558 HINSTANCE hinst; 3559 UINT uFlags; 3560 LPARAM lParam; 3561 } 3562 } else { 3563 struct NMTTDISPINFOA { 3564 NMHDR hdr; 3565 LPSTR lpszText; 3566 char[80] szText = 0; 3567 HINSTANCE hinst; 3568 UINT uFlags; 3569 } 3570 3571 struct NMTTDISPINFOW { 3572 NMHDR hdr; 3573 LPWSTR lpszText; 3574 WCHAR[80] szText = 0; 3575 HINSTANCE hinst; 3576 UINT uFlags; 3577 } 3578 } 3579 alias NMTTDISPINFOA* LPNMTTDISPINFOA; 3580 alias NMTTDISPINFOW* LPNMTTDISPINFOW; 3581 alias NMTTDISPINFOA TOOLTIPTEXTA; 3582 alias LPNMTTDISPINFOA LPTOOLTIPTEXTA; 3583 alias NMTTDISPINFOW TOOLTIPTEXTW; 3584 alias LPNMTTDISPINFOW LPTOOLTIPTEXTW; 3585 3586 struct UDACCEL { 3587 UINT nSec; 3588 UINT nInc; 3589 } 3590 alias UDACCEL* LPUDACCEL; 3591 3592 struct NMUPDOWN { 3593 NMHDR hdr; 3594 int iPos; 3595 int iDelta; 3596 } 3597 alias NMUPDOWN* LPNMUPDOWN; 3598 3599 deprecated { 3600 alias NMUPDOWN NM_UPDOWN; 3601 alias LPNMUPDOWN LPNM_UPDOWN; 3602 } 3603 3604 static if (_WIN32_WINNT >= 0x501) { 3605 struct LVITEMA { 3606 UINT mask; 3607 int iItem; 3608 int iSubItem; 3609 UINT state; 3610 UINT stateMask; 3611 LPSTR pszText; 3612 int cchTextMax; 3613 int iImage; 3614 LPARAM lParam; 3615 int iIndent; 3616 int iGroupId; 3617 UINT cColumns; 3618 PUINT puColumns; 3619 } 3620 3621 struct LVITEMW { 3622 UINT mask; 3623 int iItem; 3624 int iSubItem; 3625 UINT state; 3626 UINT stateMask; 3627 LPWSTR pszText; 3628 int cchTextMax; 3629 int iImage; 3630 LPARAM lParam; 3631 int iIndent; 3632 int iGroupId; 3633 UINT cColumns; 3634 PUINT puColumns; 3635 } 3636 } else static if (_WIN32_IE >= 0x300) { 3637 struct LVITEMA { 3638 UINT mask; 3639 int iItem; 3640 int iSubItem; 3641 UINT state; 3642 UINT stateMask; 3643 LPSTR pszText; 3644 int cchTextMax; 3645 int iImage; 3646 LPARAM lParam; 3647 int iIndent; 3648 } 3649 3650 struct LVITEMW { 3651 UINT mask; 3652 int iItem; 3653 int iSubItem; 3654 UINT state; 3655 UINT stateMask; 3656 LPWSTR pszText; 3657 int cchTextMax; 3658 int iImage; 3659 LPARAM lParam; 3660 int iIndent; 3661 } 3662 } else { 3663 struct LVITEMA { 3664 UINT mask; 3665 int iItem; 3666 int iSubItem; 3667 UINT state; 3668 UINT stateMask; 3669 LPSTR pszText; 3670 int cchTextMax; 3671 int iImage; 3672 LPARAM lParam; 3673 } 3674 3675 struct LVITEMW { 3676 UINT mask; 3677 int iItem; 3678 int iSubItem; 3679 UINT state; 3680 UINT stateMask; 3681 LPWSTR pszText; 3682 int cchTextMax; 3683 int iImage; 3684 LPARAM lParam; 3685 } 3686 } 3687 alias LVITEMA* LPLVITEMA; 3688 alias LVITEMW* LPLVITEMW; 3689 alias LVITEMA LV_ITEMA; 3690 alias LVITEMW LV_ITEMW; 3691 3692 struct LVFINDINFOA { 3693 UINT flags; 3694 LPCSTR psz; 3695 LPARAM lParam; 3696 POINT pt; 3697 UINT vkDirection; 3698 } 3699 3700 struct LVFINDINFOW { 3701 UINT flags; 3702 LPCWSTR psz; 3703 LPARAM lParam; 3704 POINT pt; 3705 UINT vkDirection; 3706 } 3707 3708 alias LVFINDINFOA* LPFINDINFOA; 3709 alias LVFINDINFOA LV_FINDINFOA; 3710 alias LVFINDINFOW* LPFINDINFOW; 3711 alias LVFINDINFOW LV_FINDINFOW; 3712 3713 struct NMLVFINDITEMA { 3714 NMHDR hdr; 3715 int iStart; 3716 LVFINDINFOA lvfi; 3717 } 3718 3719 struct NMLVFINDITEMW { 3720 NMHDR hdr; 3721 int iStart; 3722 LVFINDINFOW lvfi; 3723 } 3724 3725 alias NMLVFINDITEMA* PNMLVFINDITEMA, LPNMLVFINDITEMA; 3726 alias NMLVFINDITEMW* PNMLVFINDITEMW, LPNMLVFINDITEMW; 3727 3728 static if (_WIN32_IE >= 0x300) { 3729 struct LVHITTESTINFO { 3730 POINT pt; 3731 UINT flags; 3732 int iItem; 3733 int iSubItem; 3734 } 3735 } else { 3736 struct LVHITTESTINFO { 3737 POINT pt; 3738 UINT flags; 3739 int iItem; 3740 } 3741 } 3742 alias LVHITTESTINFO* LPLVHITTESTINFO; 3743 alias LVHITTESTINFO LV_HITTESTINFO; 3744 3745 static if (_WIN32_IE >= 0x300) { 3746 struct LVCOLUMNA { 3747 UINT mask; 3748 int fmt; 3749 int cx; 3750 LPSTR pszText; 3751 int cchTextMax; 3752 int iSubItem; 3753 int iImage; 3754 int iOrder; 3755 } 3756 struct LVCOLUMNW { 3757 UINT mask; 3758 int fmt; 3759 int cx; 3760 LPWSTR pszText; 3761 int cchTextMax; 3762 int iSubItem; 3763 int iImage; 3764 int iOrder; 3765 } 3766 } else { 3767 struct LVCOLUMNA { 3768 UINT mask; 3769 int fmt; 3770 int cx; 3771 LPSTR pszText; 3772 int cchTextMax; 3773 int iSubItem; 3774 } 3775 struct LVCOLUMNW { 3776 UINT mask; 3777 int fmt; 3778 int cx; 3779 LPWSTR pszText; 3780 int cchTextMax; 3781 int iSubItem; 3782 } 3783 } 3784 alias LVCOLUMNA* LPLVCOLUMNA; 3785 alias LVCOLUMNW* LPLVCOLUMNW; 3786 alias LVCOLUMNA LV_COLUMNA; 3787 alias LVCOLUMNW LV_COLUMNW; 3788 3789 static if (_WIN32_WINNT >= 0x501) { 3790 /* SG: The definitions in this static if block are from the MSDN docs. 3791 * They are not in MinGW, but nonetheless required for macros that are. 3792 */ 3793 struct LVGROUP { 3794 UINT cbSize = LVGROUP.sizeof; 3795 UINT mask; 3796 LPWSTR pszHeader; 3797 int cchHeader; 3798 LPWSTR pszFooter; 3799 int cchFooter; 3800 int iGroupId; 3801 UINT stateMask; 3802 UINT state; 3803 UINT uAlign; 3804 static if (_WIN32_WINNT >= 0x600) { 3805 LPWSTR pszSubtitle; 3806 UINT cchSubtitle; 3807 LPWSTR pszTask; 3808 UINT cchTask; 3809 LPWSTR pszDescriptionTop; 3810 UINT cchDescriptionTop; 3811 LPWSTR pszDescriptionBottom; 3812 UINT cchDescriptionBottom; 3813 int iTitleImage; 3814 int iExtendedImage; 3815 int iFirstItem; // Read only 3816 UINT cItems; // Read only 3817 LPWSTR pszSubsetTitle; // NULL if group is not subset 3818 UINT cchSubsetTitle; 3819 } 3820 } 3821 alias LVGROUP* PLVGROUP; 3822 3823 struct LVGROUPMETRICS { 3824 UINT cbSize = LVGROUPMETRICS.sizeof; 3825 UINT mask; 3826 UINT Left; 3827 UINT Top; 3828 UINT Right; 3829 UINT Bottom; 3830 COLORREF crLeft; 3831 COLORREF crTop; 3832 COLORREF crRight; 3833 COLORREF crBottom; 3834 COLORREF crHeader; 3835 COLORREF crFooter; 3836 } 3837 alias LVGROUPMETRICS* PLVGROUPMETRICS; 3838 3839 struct LVINSERTMARK { 3840 UINT cbSize = LVINSERTMARK.sizeof; 3841 DWORD dwFlags; 3842 int iItem; 3843 DWORD dwReserved; 3844 } 3845 alias LVINSERTMARK* PLVINSERTMARK; 3846 alias LVINSERTMARK* LPLVINSERTMARK; 3847 3848 struct LVTILEINFO { 3849 UINT cbSize = LVTILEINFO.sizeof; 3850 int iItem; 3851 UINT cColumns; 3852 PUINT puColumns; 3853 static if (_WIN32_WINNT >= 0x600) { 3854 int* piColFmt; 3855 } 3856 } 3857 alias LVTILEINFO* PLVTILEINFO; 3858 3859 struct LVTILEVIEWINFO { 3860 UINT cbSize = LVTILEVIEWINFO.sizeof; 3861 DWORD dwMask; 3862 DWORD dwFlags; 3863 SIZE sizeTile; 3864 int cLines; 3865 RECT rcLabelMargin; 3866 } 3867 alias LVTILEVIEWINFO* PLVTILEVIEWINFO; 3868 3869 struct LVINSERTGROUPSORTED { 3870 PFNLVGROUPCOMPARE pfnGroupCompare; 3871 LPVOID* pvData; 3872 LVGROUP lvGroup; 3873 } 3874 alias LVINSERTGROUPSORTED* PLVINSERTGROUPSORTED; 3875 3876 extern (Windows) alias int function(INT, INT, VOID*) PFNLVGROUPCOMPARE; 3877 3878 struct LVSETINFOTIP { 3879 UINT cbSize = LVSETINFOTIP.sizeof; 3880 DWORD dwFlags; 3881 LPWSTR pszText; 3882 int iItem; 3883 int iSubItem; 3884 HBITMAP hbmp; 3885 } 3886 alias LVSETINFOTIP* PLVSETINFOTIP; 3887 3888 struct BUTTON_IMAGELIST { 3889 HIMAGELIST himl; 3890 RECT margin; 3891 UINT uAlign; 3892 } 3893 alias BUTTON_IMAGELIST* PBUTTON_IMAGELIST; 3894 } 3895 3896 static if (_WIN32_WINNT >= 0x600) { 3897 struct LVITEMINDEX 3898 { 3899 int iItem; 3900 int iGroup; 3901 } 3902 alias LVITEMINDEX* PLVITEMINDEX; 3903 3904 struct LVFOOTERINFO 3905 { 3906 UINT mask; 3907 LPWSTR pszText; 3908 int cchTextMax; 3909 UINT cItems; 3910 } 3911 alias LVFOOTERINFO* LPLVFOOTERINFO; 3912 3913 struct LVFOOTERITEM 3914 { 3915 UINT mask; 3916 int iItem; 3917 LPWSTR pszText; 3918 int cchTextMax; 3919 UINT state; 3920 UINT stateMask; 3921 } 3922 alias LVFOOTERITEM *LPLVFOOTERITEM; 3923 3924 alias UINT TVITEMPART; 3925 enum { 3926 TVGIPR_BUTTON = 0x0001, 3927 } 3928 } 3929 3930 extern (Windows) alias int function(LPARAM, LPARAM, LPARAM) PFNLVCOMPARE; 3931 3932 struct NMLISTVIEW { 3933 NMHDR hdr; 3934 int iItem; 3935 int iSubItem; 3936 UINT uNewState; 3937 UINT uOldState; 3938 UINT uChanged; 3939 POINT ptAction; 3940 LPARAM lParam; 3941 } 3942 alias NMLISTVIEW* LPNMLISTVIEW; 3943 3944 deprecated { 3945 alias NMLISTVIEW NM_LISTVIEW; 3946 alias LPNMLISTVIEW LPNM_LISTVIEW; 3947 } 3948 3949 struct NMLVDISPINFOA { 3950 NMHDR hdr; 3951 LV_ITEMA item; 3952 } 3953 alias NMLVDISPINFOA* LPNMLVDISPINFOA; 3954 alias NMLVDISPINFOA LV_DISPINFOA; 3955 3956 struct NMLVDISPINFOW { 3957 NMHDR hdr; 3958 LV_ITEMW item; 3959 } 3960 alias NMLVDISPINFOW* LPNMLVDISPINFOW; 3961 alias NMLVDISPINFOW LV_DISPINFOW; 3962 3963 align (1) 3964 struct LV_KEYDOWN { 3965 align (1): 3966 NMHDR hdr; 3967 WORD wVKey; 3968 UINT flags; 3969 } 3970 3971 struct NMLVCACHEHINT { 3972 NMHDR hdr; 3973 int iFrom; 3974 int iTo; 3975 } 3976 alias NMLVCACHEHINT* LPNMLVCACHEHINT, PNM_CACHEHINT, LPNM_CACHEHINT; 3977 alias NMLVCACHEHINT NM_CACHEHINT; 3978 3979 struct TVITEMA { 3980 UINT mask; 3981 HTREEITEM hItem; 3982 UINT state; 3983 UINT stateMask; 3984 LPSTR pszText; 3985 int cchTextMax; 3986 int iImage; 3987 int iSelectedImage; 3988 int cChildren; 3989 LPARAM lParam; 3990 } 3991 alias TVITEMA* LPTVITEMA, LPTV_ITEMA; 3992 alias TVITEMA TV_ITEMA; 3993 3994 struct TVITEMW { 3995 UINT mask; 3996 HTREEITEM hItem; 3997 UINT state; 3998 UINT stateMask; 3999 LPWSTR pszText; 4000 int cchTextMax; 4001 int iImage; 4002 int iSelectedImage; 4003 int cChildren; 4004 LPARAM lParam; 4005 } 4006 alias TVITEMW* LPTVITEMW, LPTV_ITEMW; 4007 alias TVITEMW TV_ITEMW; 4008 4009 static if (_WIN32_IE >= 0x400) { 4010 struct TVITEMEXA { 4011 UINT mask; 4012 HTREEITEM hItem; 4013 UINT state; 4014 UINT stateMask; 4015 LPSTR pszText; 4016 int cchTextMax; 4017 int iImage; 4018 int iSelectedImage; 4019 int cChildren; 4020 LPARAM lParam; 4021 int iIntegral; 4022 } 4023 alias TVITEMEXA* LPTVITEMEXA; 4024 4025 struct TVITEMEXW { 4026 UINT mask; 4027 HTREEITEM hItem; 4028 UINT state; 4029 UINT stateMask; 4030 LPWSTR pszText; 4031 int cchTextMax; 4032 int iImage; 4033 int iSelectedImage; 4034 int cChildren; 4035 LPARAM lParam; 4036 int iIntegral; 4037 } 4038 alias TVITEMEXW* LPTVITEMEXW; 4039 } 4040 4041 static if (_WIN32_IE >= 0x400) { 4042 struct TVINSERTSTRUCTA { 4043 HTREEITEM hParent; 4044 HTREEITEM hInsertAfter; 4045 union { 4046 TVITEMEXA itemex; 4047 TV_ITEMA item; 4048 } 4049 } 4050 4051 struct TVINSERTSTRUCTW { 4052 HTREEITEM hParent; 4053 HTREEITEM hInsertAfter; 4054 union { 4055 TVITEMEXW itemex; 4056 TV_ITEMW item; 4057 } 4058 } 4059 } else { 4060 struct TVINSERTSTRUCTA { 4061 HTREEITEM hParent; 4062 HTREEITEM hInsertAfter; 4063 TV_ITEMA item; 4064 } 4065 4066 struct TVINSERTSTRUCTW { 4067 HTREEITEM hParent; 4068 HTREEITEM hInsertAfter; 4069 TV_ITEMW item; 4070 } 4071 } 4072 alias TVINSERTSTRUCTA* LPTVINSERTSTRUCTA, LPTV_INSERTSTRUCTA; 4073 alias TVINSERTSTRUCTA TV_INSERTSTRUCTA; 4074 alias TVINSERTSTRUCTW* LPTVINSERTSTRUCTW, LPTV_INSERTSTRUCTW; 4075 alias TVINSERTSTRUCTW TV_INSERTSTRUCTW; 4076 4077 struct TVHITTESTINFO { 4078 POINT pt; 4079 UINT flags; 4080 HTREEITEM hItem; 4081 } 4082 alias TVHITTESTINFO* LPTVHITTESTINFO, LPTV_HITTESTINFO; 4083 alias TVHITTESTINFO TV_HITTESTINFO; 4084 4085 static if (_WIN32_WINNT >= 0x600) { 4086 struct TVGETITEMPARTRECTINFO { 4087 HTREEITEM hti; 4088 RECT* prc; 4089 TVITEMPART partID; 4090 } 4091 } 4092 4093 extern (Windows) alias int function(LPARAM, LPARAM, LPARAM) PFNTVCOMPARE; 4094 struct TVSORTCB { 4095 HTREEITEM hParent; 4096 PFNTVCOMPARE lpfnCompare; 4097 LPARAM lParam; 4098 } 4099 alias TVSORTCB* LPTVSORTCB, LPTV_SORTCB; 4100 alias TVSORTCB TV_SORTCB; 4101 4102 struct NMTREEVIEWA { 4103 NMHDR hdr; 4104 UINT action; 4105 TV_ITEMA itemOld; 4106 TV_ITEMA itemNew; 4107 POINT ptDrag; 4108 } 4109 alias NMTREEVIEWA* LPNMTREEVIEWA, LPNM_TREEVIEWA; 4110 alias NMTREEVIEWA NM_TREEVIEWA; 4111 4112 struct NMTREEVIEWW { 4113 NMHDR hdr; 4114 UINT action; 4115 TV_ITEMW itemOld; 4116 TV_ITEMW itemNew; 4117 POINT ptDrag; 4118 } 4119 alias NMTREEVIEWW* LPNMTREEVIEWW, LPNM_TREEVIEWW; 4120 alias NMTREEVIEWW NM_TREEVIEWW; 4121 4122 struct NMTVDISPINFOA { 4123 NMHDR hdr; 4124 TVITEMA item; 4125 } 4126 alias NMTVDISPINFOA* LPNMTVDISPINFOA; 4127 alias NMTVDISPINFOA TV_DISPINFOA; 4128 4129 struct NMTVDISPINFOW { 4130 NMHDR hdr; 4131 TVITEMW item; 4132 } 4133 alias NMTVDISPINFOW* LPNMTVDISPINFOW; 4134 alias NMTVDISPINFOW TV_DISPINFOW; 4135 4136 static if (_WIN32_IE >= 0x400) { 4137 struct NMTVGETINFOTIPA { 4138 NMHDR hdr; 4139 LPSTR pszText; 4140 int cchTextMax; 4141 HTREEITEM hItem; 4142 LPARAM lParam; 4143 } 4144 alias NMTVGETINFOTIPA* LPNMTVGETINFOTIPA; 4145 4146 struct NMTVGETINFOTIPW { 4147 NMHDR hdr; 4148 LPWSTR pszText; 4149 int cchTextMax; 4150 HTREEITEM hItem; 4151 LPARAM lParam; 4152 } 4153 alias NMTVGETINFOTIPW* LPNMTVGETINFOTIPW; 4154 } 4155 4156 align (1) 4157 struct TV_KEYDOWN { 4158 align (1): 4159 NMHDR hdr; 4160 WORD wVKey; 4161 UINT flags; 4162 } 4163 4164 struct TC_ITEMHEADERA { 4165 UINT mask; 4166 UINT lpReserved1; 4167 UINT lpReserved2; 4168 LPSTR pszText; 4169 int cchTextMax; 4170 int iImage; 4171 } 4172 4173 struct TC_ITEMHEADERW { 4174 UINT mask; 4175 UINT lpReserved1; 4176 UINT lpReserved2; 4177 LPWSTR pszText; 4178 int cchTextMax; 4179 int iImage; 4180 } 4181 4182 static if (_WIN32_IE >= 0x300) { 4183 struct TCITEMA { 4184 UINT mask; 4185 DWORD dwState; 4186 DWORD dwStateMask; 4187 LPSTR pszText; 4188 int cchTextMax; 4189 int iImage; 4190 LPARAM lParam; 4191 } 4192 4193 struct TCITEMW { 4194 UINT mask; 4195 DWORD dwState; 4196 DWORD dwStateMask; 4197 LPWSTR pszText; 4198 int cchTextMax; 4199 int iImage; 4200 LPARAM lParam; 4201 } 4202 } else { 4203 struct TCITEMA { 4204 UINT mask; 4205 UINT lpReserved1; 4206 UINT lpReserved2; 4207 LPSTR pszText; 4208 int cchTextMax; 4209 int iImage; 4210 LPARAM lParam; 4211 } 4212 4213 struct TCITEMW { 4214 UINT mask; 4215 UINT lpReserved1; 4216 UINT lpReserved2; 4217 LPWSTR pszText; 4218 int cchTextMax; 4219 int iImage; 4220 LPARAM lParam; 4221 } 4222 } 4223 alias TCITEMA* LPTCITEMA; 4224 alias TCITEMA TC_ITEMA; 4225 alias TCITEMW* LPTCITEMW; 4226 alias TCITEMW TC_ITEMW; 4227 4228 struct TCHITTESTINFO { 4229 POINT pt; 4230 UINT flags; 4231 } 4232 alias TCHITTESTINFO* LPTCHITTESTINFO, LPTC_HITTESTINFO; 4233 alias TCHITTESTINFO TC_HITTESTINFO; 4234 4235 align (1) 4236 struct TC_KEYDOWN { 4237 align (1): 4238 NMHDR hdr; 4239 WORD wVKey; 4240 UINT flags; 4241 } 4242 4243 static if (_WIN32_IE >= 0x300) { 4244 struct INITCOMMONCONTROLSEX { 4245 DWORD dwSize = INITCOMMONCONTROLSEX.sizeof; 4246 DWORD dwICC; 4247 } 4248 alias INITCOMMONCONTROLSEX* LPINITCOMMONCONTROLSEX; 4249 } 4250 4251 struct PBRANGE { 4252 int iLow; 4253 int iHigh; 4254 } 4255 alias PBRANGE* PPBRANGE; 4256 4257 struct COLORSCHEME { 4258 DWORD dwSize = COLORSCHEME.sizeof; 4259 COLORREF clrBtnHighlight; 4260 COLORREF clrBtnShadow; 4261 } 4262 alias COLORSCHEME* LPCOLORSCHEME; 4263 4264 struct MCHITTESTINFO { 4265 UINT cbSize = MCHITTESTINFO.sizeof; 4266 POINT pt; 4267 UINT uHit; 4268 SYSTEMTIME st; 4269 } 4270 alias MCHITTESTINFO* PMCHITTESTINFO; 4271 4272 alias DWORD MONTHDAYSTATE; 4273 alias MONTHDAYSTATE* LPMONTHDAYSTATE; 4274 4275 struct NMDAYSTATE { 4276 NMHDR nmhdr; 4277 SYSTEMTIME stStart; 4278 int cDayState; 4279 LPMONTHDAYSTATE prgDayState; 4280 } 4281 alias NMDAYSTATE* LPNMDAYSTATE; 4282 4283 struct REBARINFO { 4284 UINT cbSize = REBARINFO.sizeof; 4285 UINT fMask; 4286 HIMAGELIST himl; 4287 } 4288 alias REBARINFO* LPREBARINFO; 4289 4290 static if (_WIN32_IE >= 0x400) { 4291 struct REBARBANDINFOA { 4292 UINT cbSize = REBARBANDINFOA.sizeof; 4293 UINT fMask; 4294 UINT fStyle; 4295 COLORREF clrFore; 4296 COLORREF clrBack; 4297 LPSTR lpText; 4298 UINT cch; 4299 int iImage; 4300 HWND hwndChild; 4301 UINT cxMinChild; 4302 UINT cyMinChild; 4303 UINT cx; 4304 HBITMAP hbmBack; 4305 UINT wID; 4306 UINT cyChild; 4307 UINT cyMaxChild; 4308 UINT cyIntegral; 4309 UINT cxIdeal; 4310 LPARAM lParam; 4311 UINT cxHeader; 4312 } 4313 4314 struct REBARBANDINFOW { 4315 UINT cbSize = REBARBANDINFOW.sizeof; 4316 UINT fMask; 4317 UINT fStyle; 4318 COLORREF clrFore; 4319 COLORREF clrBack; 4320 LPWSTR lpText; 4321 UINT cch; 4322 int iImage; 4323 HWND hwndChild; 4324 UINT cxMinChild; 4325 UINT cyMinChild; 4326 UINT cx; 4327 HBITMAP hbmBack; 4328 UINT wID; 4329 UINT cyChild; 4330 UINT cyMaxChild; 4331 UINT cyIntegral; 4332 UINT cxIdeal; 4333 LPARAM lParam; 4334 UINT cxHeader; 4335 } 4336 4337 enum : size_t { 4338 REBARBANDINFOA_V3_SIZE = REBARBANDINFOA.cyChild.offsetof, 4339 REBARBANDINFOW_V3_SIZE = REBARBANDINFOW.cyChild.offsetof 4340 } 4341 } else { 4342 struct REBARBANDINFOA { 4343 UINT cbSize = REBARBANDINFOA.sizeof; 4344 UINT fMask; 4345 UINT fStyle; 4346 COLORREF clrFore; 4347 COLORREF clrBack; 4348 LPSTR lpText; 4349 UINT cch; 4350 int iImage; 4351 HWND hwndChild; 4352 UINT cxMinChild; 4353 UINT cyMinChild; 4354 UINT cx; 4355 HBITMAP hbmBack; 4356 UINT wID; 4357 } 4358 4359 struct REBARBANDINFOW { 4360 UINT cbSize = REBARBANDINFOW.sizeof; 4361 UINT fMask; 4362 UINT fStyle; 4363 COLORREF clrFore; 4364 COLORREF clrBack; 4365 LPWSTR lpText; 4366 UINT cch; 4367 int iImage; 4368 HWND hwndChild; 4369 UINT cxMinChild; 4370 UINT cyMinChild; 4371 UINT cx; 4372 HBITMAP hbmBack; 4373 UINT wID; 4374 } 4375 4376 enum : size_t { 4377 REBARBANDINFOA_V3_SIZE = REBARBANDINFOA.sizeof, 4378 REBARBANDINFOW_V3_SIZE = REBARBANDINFOW.sizeof 4379 } 4380 } 4381 alias REBARBANDINFOA* LPREBARBANDINFOA; 4382 alias const(REBARBANDINFOA)* LPCREBARBANDINFOA; 4383 alias REBARBANDINFOW* LPREBARBANDINFOW; 4384 alias const(REBARBANDINFOW)* LPCREBARBANDINFOW; 4385 4386 static if (_WIN32_IE >= 0x300) { 4387 struct NMLVODSTATECHANGE { 4388 NMHDR hdr; 4389 int iFrom; 4390 int iTo; 4391 UINT uNewState; 4392 UINT uOldState; 4393 } 4394 alias NMLVODSTATECHANGE* LPNMLVODSTATECHANGE; 4395 4396 static if (_WIN32_WINNT >= 0x501) { 4397 struct IMAGELISTDRAWPARAMS { 4398 DWORD cbSize = IMAGELISTDRAWPARAMS.sizeof; 4399 HIMAGELIST himl; 4400 int i; 4401 HDC hdcDst; 4402 int x; 4403 int y; 4404 int cx; 4405 int cy; 4406 int xBitmap; 4407 int yBitmap; 4408 COLORREF rgbBk; 4409 COLORREF rgbFg; 4410 UINT fStyle; 4411 DWORD dwRop; 4412 DWORD fState; 4413 DWORD Frame; 4414 COLORREF crEffect; 4415 } 4416 } else { 4417 struct IMAGELISTDRAWPARAMS { 4418 DWORD cbSize = IMAGELISTDRAWPARAMS.sizeof; 4419 HIMAGELIST himl; 4420 int i; 4421 HDC hdcDst; 4422 int x; 4423 int y; 4424 int cx; 4425 int cy; 4426 int xBitmap; 4427 int yBitmap; 4428 COLORREF rgbBk; 4429 COLORREF rgbFg; 4430 UINT fStyle; 4431 DWORD dwRop; 4432 } 4433 } 4434 alias IMAGELISTDRAWPARAMS* LPIMAGELISTDRAWPARAMS; 4435 } 4436 4437 static if (_WIN32_IE >= 0x400) { 4438 struct NMREBARCHILDSIZE { 4439 NMHDR hdr; 4440 UINT uBand; 4441 UINT wID; 4442 RECT rcChild; 4443 RECT rcBand; 4444 } 4445 alias NMREBARCHILDSIZE* LPNMREBARCHILDSIZE; 4446 4447 struct NMREBAR { 4448 NMHDR hdr; 4449 DWORD dwMask; 4450 UINT uBand; 4451 UINT fStyle; 4452 UINT wID; 4453 LPARAM lParam; 4454 } 4455 alias NMREBAR* LPNMREBAR; 4456 4457 struct NMRBAUTOSIZE { 4458 NMHDR hdr; 4459 BOOL fChanged; 4460 RECT rcTarget; 4461 RECT rcActual; 4462 } 4463 alias NMRBAUTOSIZE* LPNMRBAUTOSIZE; 4464 4465 static if (_WIN32_IE >= 0x500) { 4466 struct NMREBARCHEVRON { 4467 NMHDR hdr; 4468 UINT uBand; 4469 UINT wID; 4470 LPARAM lParam; 4471 RECT rc; 4472 LPARAM lParamNM; 4473 } 4474 alias NMREBARCHEVRON* LPNMREBARCHEVRON; 4475 } 4476 4477 struct RBHITTESTINFO { 4478 POINT pt; 4479 UINT flags; 4480 int iBand; 4481 } 4482 alias RBHITTESTINFO* LPRBHITTESTINFO; 4483 } 4484 4485 mixin DECLARE_HANDLE!("HDSA"); 4486 mixin DECLARE_HANDLE!("HDPA"); 4487 4488 version (Unicode) { 4489 alias HDITEMW HDITEM; 4490 alias LPHDITEMW LPHDITEM; 4491 alias TOOLINFOW TOOLINFO; 4492 alias TOOLINFOW* PTOOLINFO, LPTOOLINFO; 4493 alias TTHITTESTINFOW TTHITTESTINFO; 4494 alias TTHITTESTINFOW* LPHITTESTINFO, LPTTHITTESTINFO; 4495 alias TOOLTIPTEXTW TOOLTIPTEXT; 4496 alias TOOLTIPTEXTW* LPTOOLTIPTEXT; 4497 alias NMTTDISPINFOW NMTTDISPINFO; 4498 alias NMTTDISPINFOW* LPNMTTDISPINFO; 4499 alias TV_ITEMW TV_ITEM; 4500 alias TV_ITEMW* LPTV_ITEM; 4501 alias TVITEMW TVITEM; 4502 alias TVITEMW* LPTVITEM; 4503 4504 static if (_WIN32_IE >= 0x400) { 4505 alias TVITEMEXW TVITEMEX; 4506 alias TVITEMEXW* LPTVITEMEX; 4507 } 4508 4509 alias TV_INSERTSTRUCTW TV_INSERTSTRUCT; 4510 alias TV_INSERTSTRUCTW* LPTV_INSERTSTRUCT; 4511 alias TVINSERTSTRUCTW TVINSERTSTRUCT; 4512 alias TVINSERTSTRUCTW* LPTVINSERTSTRUCT; 4513 alias NM_TREEVIEWW NM_TREEVIEW; 4514 alias NM_TREEVIEWW* LPNM_TREEVIEW; 4515 alias NMTREEVIEWW NMTREEVIEW; 4516 alias NMTREEVIEWW* LPNMTREEVIEW; 4517 alias NMHDDISPINFOW NMHDDISPINFO; 4518 alias NMHDDISPINFOW* LPNMHDDISPINFO; 4519 4520 alias ACM_OPENW ACM_OPEN; 4521 alias COMBOBOXEXITEMW COMBOBOXEXITEM; 4522 alias PCOMBOBOXEXITEMW PCOMBOBOXEXITEM; 4523 //alias PCCOMBOBOXEXITEMW PCCOMBOBOXEXITEM; fixme 4524 alias CBEM_INSERTITEMW CBEM_INSERTITEM; 4525 alias CBEM_SETITEMW CBEM_SETITEM; 4526 alias CBEM_GETITEMW CBEM_GETITEM; 4527 alias CBEN_ENDEDITW CBEN_ENDEDIT; 4528 alias NMCBEENDEDITW NMCBEENDEDIT; 4529 alias LPNMCBEENDEDITW LPNMCBEENDEDIT; 4530 alias PNMCBEENDEDITW PNMCBEENDEDIT; 4531 4532 static if (_WIN32_IE >= 0x400) { 4533 alias NMCOMBOBOXEXW NMCOMBOBOXEX; 4534 alias PNMCOMBOBOXEXW PNMCOMBOBOXEX; 4535 alias CBEN_GETDISPINFOW CBEN_GETDISPINFO; 4536 alias CBEN_DRAGBEGINW CBEN_DRAGBEGIN; 4537 alias NMCBEDRAGBEGINW NMCBEDRAGBEGIN; 4538 alias LPNMCBEDRAGBEGINW LPNMCBEDRAGBEGIN; 4539 alias PNMCBEDRAGBEGINW PNMCBEDRAGBEGIN; 4540 } 4541 4542 alias SB_GETTEXTW SB_GETTEXT; 4543 alias SB_SETTEXTW SB_SETTEXT; 4544 alias SB_GETTEXTLENGTHW SB_GETTEXTLENGTH; 4545 alias HDM_INSERTITEMW HDM_INSERTITEM; 4546 alias HDM_GETITEMW HDM_GETITEM; 4547 alias HDM_SETITEMW HDM_SETITEM; 4548 alias HDN_ITEMCHANGINGW HDN_ITEMCHANGING; 4549 alias HDN_ITEMCHANGEDW HDN_ITEMCHANGED; 4550 alias HDN_ITEMCLICKW HDN_ITEMCLICK; 4551 alias HDN_ITEMDBLCLICKW HDN_ITEMDBLCLICK; 4552 alias HDN_DIVIDERDBLCLICKW HDN_DIVIDERDBLCLICK; 4553 alias HDN_BEGINTRACKW HDN_BEGINTRACK; 4554 alias HDN_ENDTRACKW HDN_ENDTRACK; 4555 alias HDN_TRACKW HDN_TRACK; 4556 4557 static if (_WIN32_IE >= 0x300) { 4558 alias HDN_GETDISPINFOW HDN_GETDISPINFO; 4559 } 4560 4561 alias HD_NOTIFYW HD_NOTIFY; 4562 alias TBSAVEPARAMSW TBSAVEPARAMS; 4563 alias TB_GETBUTTONTEXTW TB_GETBUTTONTEXT; 4564 alias TB_SAVERESTOREW TB_SAVERESTORE; 4565 alias TB_ADDSTRINGW TB_ADDSTRING; 4566 4567 static if (_WIN32_IE >= 0x400) { 4568 alias TBN_GETBUTTONINFOW TBN_GETBUTTONINFO; // fixme 4569 alias TB_GETBUTTONINFOW TB_GETBUTTONINFO; 4570 alias TB_SETBUTTONINFOW TB_SETBUTTONINFO; 4571 alias TB_INSERTBUTTONW TB_INSERTBUTTON; 4572 alias TB_ADDBUTTONSW TB_ADDBUTTONS; 4573 alias TB_MAPACCELERATORW TB_MAPACCELERATOR; 4574 alias TB_GETSTRINGW TB_GETSTRING; 4575 alias TBBUTTONINFOW TBBUTTONINFO; 4576 alias LPTBBUTTONINFOW LPTBBUTTONINFO; 4577 alias TBN_GETDISPINFOW TBN_GETDISPINFO; 4578 alias NMTBDISPINFOW NMTBDISPINFO; 4579 alias LPNMTBDISPINFOW LPNMTBDISPINFO; 4580 alias NMTBGETINFOTIPW NMTBGETINFOTIP; 4581 alias LPNMTBGETINFOTIPW LPNMTBGETINFOTIP; 4582 } 4583 4584 alias TBNOTIFYW TBNOTIFY; 4585 alias LPTBNOTIFYW LPTBNOTIFY; 4586 alias NMTOOLBARW NMTOOLBAR; 4587 alias LPNMTOOLBARW LPNMTOOLBAR; 4588 alias TTM_ADDTOOLW TTM_ADDTOOL; 4589 alias TTM_DELTOOLW TTM_DELTOOL; 4590 alias TTM_NEWTOOLRECTW TTM_NEWTOOLRECT; 4591 alias TTM_GETTOOLINFOW TTM_GETTOOLINFO; 4592 alias TTM_SETTOOLINFOW TTM_SETTOOLINFO; 4593 alias TTM_HITTESTW TTM_HITTEST; 4594 alias TTM_GETTEXTW TTM_GETTEXT; 4595 alias TTM_UPDATETIPTEXTW TTM_UPDATETIPTEXT; 4596 alias TTM_ENUMTOOLSW TTM_ENUMTOOLS; 4597 alias TTM_GETCURRENTTOOLW TTM_GETCURRENTTOOL; 4598 alias TTN_NEEDTEXTW TTN_NEEDTEXT; 4599 alias TTN_GETDISPINFOW TTN_GETDISPINFO; 4600 //alias SB_GETTEXTW SB_GETTEXT; 4601 //alias SB_SETTEXTW SB_SETTEXT; 4602 //alias SB_GETTEXTLENGTHW SB_GETTEXTLENGTH; 4603 alias LV_ITEMW LV_ITEM; 4604 alias LVITEMW LVITEM; 4605 alias LVITEM* LPLVITEM; 4606 alias LPSTR_TEXTCALLBACKW LPSTR_TEXTCALLBACK; 4607 4608 static if (_WIN32_IE >= 0x400) { 4609 alias LVBKIMAGEW LVBKIMAGE; 4610 alias LPLVBKIMAGEW LPLVBKIMAGE; 4611 alias LVM_SETBKIMAGEW LVM_SETBKIMAGE; 4612 alias LVM_GETBKIMAGEW LVM_GETBKIMAGE; 4613 } 4614 4615 alias LVM_GETITEMW LVM_GETITEM; 4616 alias LVM_SETITEMW LVM_SETITEM; 4617 alias LVM_INSERTITEMW LVM_INSERTITEM; 4618 alias LV_FINDINFOW LV_FINDINFO; 4619 alias LVFINDINFOW LVFINDINFO; 4620 alias LPFINDINFOW LPFINDINFO; 4621 alias NMLVFINDITEMW NMLVFINDITEM; 4622 alias PNMLVFINDITEMW PNMLVFINDITEM; 4623 alias LPNMLVFINDITEMW LPNMLVFINDITEM; 4624 alias LVM_FINDITEMW LVM_FINDITEM; 4625 alias LVM_GETSTRINGWIDTHW LVM_GETSTRINGWIDTH; 4626 alias LVM_EDITLABELW LVM_EDITLABEL; 4627 alias LV_COLUMNW LV_COLUMN; 4628 alias LVCOLUMNW LVCOLUMN; 4629 alias LVCOLUMNW* LPLVCOLUMN; 4630 alias LVM_GETCOLUMNW LVM_GETCOLUMN; 4631 alias LVM_SETCOLUMNW LVM_SETCOLUMN; 4632 alias LVM_INSERTCOLUMNW LVM_INSERTCOLUMN; 4633 alias LVM_GETITEMTEXTW LVM_GETITEMTEXT; 4634 alias LVM_SETITEMTEXTW LVM_SETITEMTEXT; 4635 alias LVM_GETISEARCHSTRINGW LVM_GETISEARCHSTRING; 4636 alias LVN_BEGINLABELEDITW LVN_BEGINLABELEDIT; 4637 alias LVN_ENDLABELEDITW LVN_ENDLABELEDIT; 4638 alias LVN_GETDISPINFOW LVN_GETDISPINFO; 4639 alias LVN_SETDISPINFOW LVN_SETDISPINFO; 4640 4641 static if (_WIN32_IE >= 0x400) { 4642 alias LVN_GETINFOTIPW LVN_GETINFOTIP; 4643 alias NMLVGETINFOTIPW NMLVGETINFOTIP; 4644 alias LPNMLVGETINFOTIPW LPNMLVGETINFOTIP; 4645 } 4646 4647 alias LV_DISPINFOW LV_DISPINFO; 4648 alias NMLVDISPINFOW NMLVDISPINFO; 4649 alias LPNMLVDISPINFOW LPNMLVDISPINFO; 4650 alias TVM_INSERTITEMW TVM_INSERTITEM; 4651 alias TVM_GETITEMW TVM_GETITEM; 4652 alias TVM_SETITEMW TVM_SETITEM; 4653 alias TVM_EDITLABELW TVM_EDITLABEL; 4654 alias TVM_GETISEARCHSTRINGW TVM_GETISEARCHSTRING; 4655 alias NMTVDISPINFOW TV_DISPINFO; 4656 alias NMTVDISPINFOW NMTVDISPINFO; 4657 alias LPNMTVDISPINFOW LPNMTVDISPINFO; 4658 4659 static if (_WIN32_IE >= 0x400) { 4660 alias NMTVGETINFOTIPW NMTVGETINFOTIP; 4661 alias LPNMTVGETINFOTIPW LPNMTVGETINFOTIP; 4662 alias TVN_GETINFOTIPW TVN_GETINFOTIP; 4663 } 4664 4665 alias TVN_SELCHANGINGW TVN_SELCHANGING; 4666 alias TVN_SELCHANGEDW TVN_SELCHANGED; 4667 alias TVN_GETDISPINFOW TVN_GETDISPINFO; 4668 alias TVN_SETDISPINFOW TVN_SETDISPINFO; 4669 alias TVN_ITEMEXPANDINGW TVN_ITEMEXPANDING; 4670 alias TVN_ITEMEXPANDEDW TVN_ITEMEXPANDED; 4671 alias TVN_BEGINDRAGW TVN_BEGINDRAG; 4672 alias TVN_BEGINRDRAGW TVN_BEGINRDRAG; 4673 alias TVN_DELETEITEMW TVN_DELETEITEM; 4674 alias TVN_BEGINLABELEDITW TVN_BEGINLABELEDIT; 4675 alias TVN_ENDLABELEDITW TVN_ENDLABELEDIT; 4676 alias TC_ITEMHEADERW TC_ITEMHEADER; 4677 alias TC_ITEMW TC_ITEM; 4678 alias TCITEMW TCITEM; 4679 alias LPTCITEMW LPTCITEM; 4680 alias TCM_GETITEMW TCM_GETITEM; 4681 alias TCM_SETITEMW TCM_SETITEM; 4682 alias TCM_INSERTITEMW TCM_INSERTITEM; 4683 alias CreateStatusWindowW CreateStatusWindow; 4684 alias DrawStatusTextW DrawStatusText; 4685 alias ImageList_LoadImageW ImageList_LoadImage; 4686 alias DTM_SETFORMATW DTM_SETFORMAT; 4687 alias DTN_USERSTRINGW DTN_USERSTRING; 4688 alias DTN_WMKEYDOWNW DTN_WMKEYDOWN; 4689 alias DTN_FORMATW DTN_FORMAT; 4690 alias DTN_FORMATQUERYW DTN_FORMATQUERY; 4691 alias REBARBANDINFOW REBARBANDINFO; 4692 alias REBARBANDINFO* LPREBARBANDINFO; 4693 alias LPCREBARBANDINFOW LPCREBARBANDINFO; 4694 alias REBARBANDINFOW_V3_SIZE REBARBANDINFO_V3_SIZE; 4695 alias RB_INSERTBANDW RB_INSERTBAND; 4696 alias RB_SETBANDINFOW RB_SETBANDINFO; 4697 } else { 4698 alias HDITEMA HDITEM; 4699 alias LPHDITEMA LPHDITEM; 4700 alias TOOLINFOA TOOLINFO; 4701 alias TOOLINFOA* PTOOLINFO, LPTOOLINFO; 4702 alias TTHITTESTINFOA TTHITTESTINFO; 4703 alias TTHITTESTINFOA* LPHITTESTINFO, LPTTHITTESTINFO; 4704 alias TOOLTIPTEXTA TOOLTIPTEXT; 4705 alias TOOLTIPTEXTA* LPTOOLTIPTEXT; 4706 alias NMTTDISPINFOA NMTTDISPINFO; 4707 alias NMTTDISPINFOA* LPNMTTDISPINFO; 4708 alias TV_ITEMA TV_ITEM; 4709 alias TV_ITEMA* LPTV_ITEM; 4710 alias TVITEMA TVITEM; 4711 alias TVITEMA* LPTVITEM; 4712 4713 static if (_WIN32_IE >= 0x400) { 4714 alias TVITEMEXA TVITEMEX; 4715 alias TVITEMEXA* LPTVITEMEX; 4716 } 4717 4718 alias TV_INSERTSTRUCTA TV_INSERTSTRUCT; 4719 alias TV_INSERTSTRUCTA* LPTV_INSERTSTRUCT; 4720 alias TVINSERTSTRUCTA TVINSERTSTRUCT; 4721 alias TVINSERTSTRUCTA* LPTVINSERTSTRUCT; 4722 alias NM_TREEVIEWA NM_TREEVIEW; 4723 alias NM_TREEVIEWA* LPNM_TREEVIEW; 4724 alias NMTREEVIEWA NMTREEVIEW; 4725 alias NMTREEVIEWA* LPNMTREEVIEW; 4726 alias NMHDDISPINFOW NMHDDISPINFO; 4727 alias NMHDDISPINFOW* LPNMHDDISPINFO; 4728 4729 alias ACM_OPENA ACM_OPEN; 4730 alias COMBOBOXEXITEMA COMBOBOXEXITEM; 4731 alias PCOMBOBOXEXITEMA PCOMBOBOXEXITEM; 4732 //alias PCCOMBOBOXEXITEMA PCCOMBOBOXEXITEM; fixme 4733 alias CBEM_INSERTITEMA CBEM_INSERTITEM; 4734 alias CBEM_SETITEMA CBEM_SETITEM; 4735 alias CBEM_GETITEMA CBEM_GETITEM; 4736 alias CBEN_ENDEDITA CBEN_ENDEDIT; 4737 alias NMCBEENDEDITA NMCBEENDEDIT; 4738 alias LPNMCBEENDEDITA LPNMCBEENDEDIT; 4739 alias PNMCBEENDEDITA PNMCBEENDEDIT; 4740 4741 static if (_WIN32_IE >= 0x400) { 4742 alias TB_GETBUTTONINFOA TB_GETBUTTONINFO; 4743 alias TB_SETBUTTONINFOA TB_SETBUTTONINFO; 4744 alias TB_INSERTBUTTONA TB_INSERTBUTTON; 4745 alias TB_ADDBUTTONSA TB_ADDBUTTONS; 4746 alias TB_MAPACCELERATORA TB_MAPACCELERATOR; 4747 alias TB_GETSTRINGA TB_GETSTRING; 4748 alias NMCOMBOBOXEXA NMCOMBOBOXEX; 4749 alias PNMCOMBOBOXEXA PNMCOMBOBOXEX; 4750 alias CBEN_DRAGBEGINA CBEN_DRAGBEGIN; 4751 alias CBEN_GETDISPINFOA CBEN_GETDISPINFO; 4752 alias NMCBEDRAGBEGINA NMCBEDRAGBEGIN; 4753 alias LPNMCBEDRAGBEGINA LPNMCBEDRAGBEGIN; 4754 alias PNMCBEDRAGBEGINA PNMCBEDRAGBEGIN; 4755 alias TBN_GETDISPINFOA TBN_GETDISPINFO; 4756 alias NMTBDISPINFOA NMTBDISPINFO; 4757 alias LPNMTBDISPINFOA LPNMTBDISPINFO; 4758 alias NMTBGETINFOTIPA NMTBGETINFOTIP; 4759 alias LPNMTBGETINFOTIPA LPNMTBGETINFOTIP; 4760 } 4761 4762 alias SB_GETTEXTA SB_GETTEXT; 4763 alias SB_SETTEXTA SB_SETTEXT; 4764 alias SB_GETTEXTLENGTHA SB_GETTEXTLENGTH; 4765 alias HDM_INSERTITEMA HDM_INSERTITEM; 4766 alias HDM_GETITEMA HDM_GETITEM; 4767 alias HDM_SETITEMA HDM_SETITEM; 4768 alias HDN_ITEMCHANGINGA HDN_ITEMCHANGING; 4769 alias HDN_ITEMCHANGEDA HDN_ITEMCHANGED; 4770 alias HDN_ITEMCLICKA HDN_ITEMCLICK; 4771 alias HDN_ITEMDBLCLICKA HDN_ITEMDBLCLICK; 4772 alias HDN_DIVIDERDBLCLICKA HDN_DIVIDERDBLCLICK; 4773 alias HDN_BEGINTRACKA HDN_BEGINTRACK; 4774 alias HDN_ENDTRACKA HDN_ENDTRACK; 4775 alias HDN_TRACKA HDN_TRACK; 4776 4777 static if (_WIN32_IE >= 0x300) { 4778 alias HDN_GETDISPINFOA HDN_GETDISPINFO; 4779 } 4780 4781 alias HD_NOTIFYA HD_NOTIFY; 4782 alias TBSAVEPARAMSA TBSAVEPARAMS; 4783 alias TB_GETBUTTONTEXTA TB_GETBUTTONTEXT; 4784 alias TB_SAVERESTOREA TB_SAVERESTORE; 4785 alias TB_ADDSTRINGA TB_ADDSTRING; 4786 alias TBN_GETBUTTONINFOA TBN_GETBUTTONINFO; 4787 4788 static if (_WIN32_IE >= 0x400) { 4789 alias TBBUTTONINFOA TBBUTTONINFO; 4790 alias LPTBBUTTONINFOA LPTBBUTTONINFO; 4791 } 4792 4793 alias TBNOTIFYA TBNOTIFY; 4794 alias LPTBNOTIFYA LPTBNOTIFY; 4795 alias NMTOOLBARA NMTOOLBAR; 4796 alias LPNMTOOLBARA LPNMTOOLBAR; 4797 alias TTM_ADDTOOLA TTM_ADDTOOL; 4798 alias TTM_DELTOOLA TTM_DELTOOL; 4799 alias TTM_NEWTOOLRECTA TTM_NEWTOOLRECT; 4800 alias TTM_GETTOOLINFOA TTM_GETTOOLINFO; 4801 alias TTM_SETTOOLINFOA TTM_SETTOOLINFO; 4802 alias TTM_HITTESTA TTM_HITTEST; 4803 alias TTM_GETTEXTA TTM_GETTEXT; 4804 alias TTM_UPDATETIPTEXTA TTM_UPDATETIPTEXT; 4805 alias TTM_ENUMTOOLSA TTM_ENUMTOOLS; 4806 alias TTM_GETCURRENTTOOLA TTM_GETCURRENTTOOL; 4807 alias TTN_NEEDTEXTA TTN_NEEDTEXT; 4808 alias TTN_GETDISPINFOA TTN_GETDISPINFO; 4809 alias LV_ITEMA LV_ITEM; 4810 alias LVITEMA LVITEM; 4811 alias LVITEM* LPLVITEM; 4812 alias LPSTR_TEXTCALLBACKA LPSTR_TEXTCALLBACK; 4813 4814 static if (_WIN32_IE >= 0x400) { 4815 alias LVBKIMAGEA LVBKIMAGE; 4816 alias LPLVBKIMAGEA LPLVBKIMAGE; 4817 alias LVM_SETBKIMAGEA LVM_SETBKIMAGE; 4818 alias LVM_GETBKIMAGEA LVM_GETBKIMAGE; 4819 } 4820 4821 alias LVM_GETITEMA LVM_GETITEM; 4822 alias LVM_SETITEMA LVM_SETITEM; 4823 alias LVM_INSERTITEMA LVM_INSERTITEM; 4824 alias LV_FINDINFOA LV_FINDINFO; 4825 alias LVFINDINFOA LVFINDINFO; 4826 alias LPFINDINFOA LPFINDINFO; 4827 alias NMLVFINDITEMA NMLVFINDITEM; 4828 alias PNMLVFINDITEMA PNMLVFINDITEM; 4829 alias LPNMLVFINDITEMA LPNMLVFINDITEM; 4830 alias LVM_FINDITEMA LVM_FINDITEM; 4831 alias LVM_GETSTRINGWIDTHA LVM_GETSTRINGWIDTH; 4832 alias LVM_EDITLABELA LVM_EDITLABEL; 4833 alias LV_COLUMNA LV_COLUMN; 4834 alias LVCOLUMNA LVCOLUMN; 4835 alias LVCOLUMNA* LPLVCOLUMN; 4836 alias LVM_GETCOLUMNA LVM_GETCOLUMN; 4837 alias LVM_SETCOLUMNA LVM_SETCOLUMN; 4838 alias LVM_INSERTCOLUMNA LVM_INSERTCOLUMN; 4839 alias LVM_GETITEMTEXTA LVM_GETITEMTEXT; 4840 alias LVM_SETITEMTEXTA LVM_SETITEMTEXT; 4841 alias LVM_GETISEARCHSTRINGA LVM_GETISEARCHSTRING; 4842 alias LVN_BEGINLABELEDITA LVN_BEGINLABELEDIT; 4843 alias LVN_ENDLABELEDITA LVN_ENDLABELEDIT; 4844 alias LVN_GETDISPINFOA LVN_GETDISPINFO; 4845 alias LVN_SETDISPINFOA LVN_SETDISPINFO; 4846 4847 static if (_WIN32_IE >= 0x400) { 4848 alias LVN_GETINFOTIPA LVN_GETINFOTIP; 4849 alias NMLVGETINFOTIPA NMLVGETINFOTIP; 4850 alias LPNMLVGETINFOTIPA LPNMLVGETINFOTIP; 4851 } 4852 4853 alias LV_DISPINFOA LV_DISPINFO; 4854 alias NMLVDISPINFOA NMLVDISPINFO; 4855 alias LPNMLVDISPINFOA LPNMLVDISPINFO; 4856 alias TVM_INSERTITEMA TVM_INSERTITEM; 4857 alias TVM_GETITEMA TVM_GETITEM; 4858 alias TVM_SETITEMA TVM_SETITEM; 4859 alias TVM_EDITLABELA TVM_EDITLABEL; 4860 alias TVM_GETISEARCHSTRINGA TVM_GETISEARCHSTRING; 4861 alias NMTVDISPINFOA TV_DISPINFO; 4862 alias NMTVDISPINFOA NMTVDISPINFO; 4863 alias LPNMTVDISPINFOA LPNMTVDISPINFO; 4864 4865 static if (_WIN32_IE >= 0x400) { 4866 alias NMTVGETINFOTIPA NMTVGETINFOTIP; 4867 alias LPNMTVGETINFOTIPA LPNMTVGETINFOTIP; 4868 alias TVN_GETINFOTIPA TVN_GETINFOTIP; 4869 } 4870 4871 alias TVN_SELCHANGINGA TVN_SELCHANGING; 4872 alias TVN_SELCHANGEDA TVN_SELCHANGED; 4873 alias TVN_GETDISPINFOA TVN_GETDISPINFO; 4874 alias TVN_SETDISPINFOA TVN_SETDISPINFO; 4875 alias TVN_ITEMEXPANDINGA TVN_ITEMEXPANDING; 4876 alias TVN_ITEMEXPANDEDA TVN_ITEMEXPANDED; 4877 alias TVN_BEGINDRAGA TVN_BEGINDRAG; 4878 alias TVN_BEGINRDRAGA TVN_BEGINRDRAG; 4879 alias TVN_DELETEITEMA TVN_DELETEITEM; 4880 alias TVN_BEGINLABELEDITA TVN_BEGINLABELEDIT; 4881 alias TVN_ENDLABELEDITA TVN_ENDLABELEDIT; 4882 alias TC_ITEMHEADERA TC_ITEMHEADER; 4883 alias TC_ITEMA TC_ITEM; 4884 alias TCITEMA TCITEM; 4885 alias LPTCITEMA LPTCITEM; 4886 alias TCM_GETITEMA TCM_GETITEM; 4887 alias TCM_SETITEMA TCM_SETITEM; 4888 alias TCM_INSERTITEMA TCM_INSERTITEM; 4889 alias CreateStatusWindowA CreateStatusWindow; 4890 alias DrawStatusTextA DrawStatusText; 4891 alias ImageList_LoadImageA ImageList_LoadImage; 4892 alias DTM_SETFORMATA DTM_SETFORMAT; 4893 alias DTN_USERSTRINGA DTN_USERSTRING; 4894 alias DTN_WMKEYDOWNA DTN_WMKEYDOWN; 4895 alias DTN_FORMATA DTN_FORMAT; 4896 alias DTN_FORMATQUERYA DTN_FORMATQUERY; 4897 alias REBARBANDINFOA REBARBANDINFO; 4898 alias REBARBANDINFOA* LPREBARBANDINFO; 4899 alias LPCREBARBANDINFOA LPCREBARBANDINFO; 4900 alias REBARBANDINFOA_V3_SIZE REBARBANDINFO_V3_SIZE; 4901 alias RB_INSERTBANDA RB_INSERTBAND; 4902 alias RB_SETBANDINFOA RB_SETBANDINFO; 4903 } 4904 4905 4906 extern (Windows) { 4907 alias INT function(PVOID, PVOID) PFNDPAENUMCALLBACK; 4908 alias INT function(PVOID, PVOID) PFNDSAENUMCALLBACK; 4909 alias INT function(PVOID, PVOID, LPARAM) PFNDPACOMPARE; 4910 } 4911 4912 static if (_WIN32_WINNT >= 0x501) { 4913 extern (Windows) 4914 alias LRESULT function(HWND, UINT, WPARAM, LPARAM, UINT_PTR, DWORD_PTR) 4915 SUBCLASSPROC; 4916 4917 struct LITEM { 4918 UINT mask; 4919 int iLink; 4920 UINT state; 4921 UINT stateMask; 4922 WCHAR[MAX_LINKID_TEXT] szID = 0; 4923 WCHAR[L_MAX_URL_LENGTH] szUrl = 0; 4924 } 4925 alias LITEM* PLITEM; 4926 4927 struct LHITTESTINFO { 4928 POINT pt; 4929 LITEM item; 4930 } 4931 alias LHITTESTINFO* PLHITTESTINFO; 4932 4933 struct NMLINK { 4934 NMHDR hdr; 4935 LITEM item; 4936 } 4937 alias NMLINK* PNMLINK; 4938 } 4939 4940 uint INDEXTOOVERLAYMASK(uint i) { return i << 8; } 4941 uint INDEXTOSTATEIMAGEMASK(uint i) { return i << 12; } 4942 4943 template HANDLE_WM_NOTIFY(R) { 4944 private alias _prm_HANDLE_WM_NOTIFY = extern (Windows) 4945 R function(HWND, int, NMHDR*); // to inject linkage type 4946 R HANDLE_WM_NOTIFY(HWND hwnd, WPARAM wParam, LPARAM lParam, _prm_HANDLE_WM_NOTIFY fn) { 4947 return fn(hwnd, wParam, cast(NMHDR*) lParam); 4948 } 4949 } 4950 private alias _prm_FORWARD_WM_NOTIFY = extern (Windows) 4951 LRESULT function(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); // to inject linkage type 4952 LRESULT FORWARD_WM_NOTIFY(HWND hwnd, int idFrom, NMHDR* pnmhdr, _prm_FORWARD_WM_NOTIFY fn) { 4953 return fn(hwnd, WM_NOTIFY, idFrom, cast(LPARAM) pnmhdr); 4954 } 4955 4956 //#define CCSIZEOF_STRUCT(s, m) (((int)((PBYTE)(&((s*)0)->m)-((PBYTE)((s*)0))))+sizeof(((s*)0)->m)) 4957 4958 LPARAM MAKEIPADDRESS(ubyte b1, ubyte b2, ubyte b3, ubyte b4) { 4959 return (cast(DWORD) b1 << 24) 4960 | (cast(DWORD) b2 << 16) 4961 | (cast(DWORD) b3 << 8) 4962 | (cast(DWORD) b4); 4963 } 4964 4965 LPARAM MAKEIPRANGE(ubyte low, ubyte high) { 4966 return (cast(int) high << 8) | low; 4967 } 4968 4969 ubyte FIRST_IPADDRESS(LPARAM x) { 4970 return cast(ubyte) (x >> 24); 4971 } 4972 4973 ubyte SECOND_IPADDRESS(LPARAM x) { 4974 return cast(ubyte) (x >> 16); 4975 } 4976 4977 ubyte THIRD_IPADDRESS(LPARAM x) { 4978 return cast(ubyte) (x >> 8); 4979 } 4980 4981 ubyte FOURTH_IPADDRESS(LPARAM x) { 4982 return cast(ubyte) x; 4983 } 4984 4985 HWND Animate_Create(HWND hwndP, UINT id, DWORD dwStyle, 4986 HINSTANCE hInstance) { 4987 return CreateWindow(cast(TCHAR*)ANIMATE_CLASS.ptr, null, dwStyle, 0, 0, 0, 0, hwndP, 4988 cast(HMENU) id, hInstance, null); 4989 } 4990 4991 BOOL Animate_Open(HWND hwnd, LPTSTR szName) { 4992 return cast(BOOL) SendMessage(hwnd, ACM_OPEN, 0, cast(LPARAM) szName); 4993 } 4994 4995 BOOL Animate_OpenEx(HWND hwnd, HINSTANCE hInst, LPTSTR szName) { 4996 return cast(BOOL) SendMessage(hwnd, ACM_OPEN, cast(WPARAM) hInst, 4997 cast(LPARAM) szName); 4998 } 4999 5000 BOOL Animate_Play(HWND hwnd, int from, int to, int rep) { 5001 return cast(BOOL) SendMessage(hwnd, ACM_PLAY, rep, 5002 MAKELONG(cast(ushort) from, cast(ushort) to)); 5003 } 5004 5005 BOOL Animate_Stop(HWND hwnd) { 5006 return cast(BOOL) SendMessage(hwnd, ACM_STOP, 0, 0); 5007 } 5008 5009 BOOL Animate_Close(HWND hwnd) { 5010 return Animate_Open(hwnd, null); 5011 } 5012 5013 BOOL Animate_Seek(HWND hwnd, int frame) { 5014 return Animate_Play(hwnd, frame, frame, 1); 5015 } 5016 5017 extern (Windows) { 5018 HBITMAP CreateMappedBitmap(HINSTANCE, INT_PTR, UINT, LPCOLORMAP, int); 5019 HWND CreateStatusWindowA(LONG, LPCSTR, HWND, UINT); 5020 HWND CreateStatusWindowW(LONG, LPCWSTR, HWND, UINT); 5021 HWND CreateToolbarEx(HWND, DWORD, UINT, int, HINSTANCE, UINT_PTR, 5022 LPCTBBUTTON, int, int, int, int, int, UINT); 5023 HWND CreateUpDownControl(DWORD, int, int, int, int, HWND, int, HINSTANCE, 5024 HWND, int, int, int); 5025 } 5026 5027 HWND DateTime_GetMonthCal(HWND hwnd) { 5028 return cast(HWND) SendMessage(hwnd, DTM_GETMONTHCAL, 0, 0); 5029 } 5030 5031 COLORREF DateTime_GetMonthCalColor(HWND hwnd, int iColor) { 5032 return cast(COLORREF) SendMessage(hwnd, DTM_GETMCCOLOR, iColor, 0); 5033 } 5034 5035 HFONT DateTime_GetMonthCalFont(HWND hwnd) { 5036 return cast(HFONT) SendMessage(hwnd, DTM_GETMCFONT, 0, 0); 5037 } 5038 5039 DWORD DateTime_GetRange(HWND hwnd, LPSYSTEMTIME lpSysTimeArray) { 5040 return cast(DWORD) SendMessage(hwnd, DTM_GETRANGE, 0, cast(LPARAM) lpSysTimeArray); 5041 } 5042 5043 DWORD DateTime_GetSystemtime(HWND hwnd, LPSYSTEMTIME lpSysTime) { 5044 return cast(DWORD) SendMessage(hwnd, DTM_GETSYSTEMTIME, 0, cast(LPARAM) lpSysTime); 5045 } 5046 5047 BOOL DateTime_SetFormat(HWND hwnd, LPCTSTR lpszFormat) { 5048 return cast(BOOL) SendMessage(hwnd, DTM_SETFORMAT, 0, 5049 cast(LPARAM) lpszFormat); 5050 } 5051 5052 LRESULT DateTime_SetMonthCalColor(HWND hwnd, int iColor, COLORREF clr) { 5053 return SendMessage(hwnd, DTM_SETMCCOLOR, cast(WPARAM) iColor, 5054 cast(LPARAM) clr); 5055 } 5056 5057 void DateTime_SetMonthCalFont(HWND hwnd, HFONT hfont, BOOL fRedraw) { 5058 SendMessage(hwnd, DTM_SETMCFONT, cast(WPARAM) hfont, fRedraw); 5059 } 5060 5061 BOOL DateTime_SetRange(HWND hwnd, WPARAM flags, LPSYSTEMTIME lpSysTimeArray) { 5062 return cast(BOOL) SendMessage(hwnd, DTM_SETRANGE, flags, 5063 cast(LPARAM) lpSysTimeArray); 5064 } 5065 5066 BOOL DateTime_SetSystemtime(HWND hwnd, WPARAM flag, LPSYSTEMTIME lpSysTime) { 5067 return cast(BOOL) SendMessage(hwnd, DTM_SETSYSTEMTIME, flag, 5068 cast(LPARAM) lpSysTime); 5069 } 5070 5071 extern (Windows) { 5072 void DrawInsert(HWND, HWND, int); 5073 void DrawStatusTextA(HDC, LPRECT, LPCSTR, UINT); 5074 void DrawStatusTextW(HDC, LPRECT, LPCWSTR, UINT); 5075 void GetEffectiveClientRect(HWND, LPRECT, LPINT); 5076 } 5077 5078 int Header_GetItemCount(HWND w) { 5079 return cast(int) SendMessage(w, HDM_GETITEMCOUNT, 0, 0); 5080 } 5081 5082 int Header_InsertItem(HWND w, int i, const(HDITEM)* phdi) { 5083 return cast(int) SendMessage(w, HDM_INSERTITEM, i, cast(LPARAM) phdi); 5084 } 5085 5086 BOOL Header_DeleteItem(HWND w, int i) { 5087 return cast(BOOL) SendMessage(w, HDM_DELETEITEM, i, 0); 5088 } 5089 5090 BOOL Header_GetItem(HWND w, int i, LPHDITEM phdi) { 5091 return cast(BOOL) SendMessage(w, HDM_GETITEM, i, cast(LPARAM) phdi); 5092 } 5093 5094 BOOL Header_SetItem(HWND w, int i, const(HDITEM)* phdi) { 5095 return cast(BOOL) SendMessage(w, HDM_SETITEM, i, cast(LPARAM) phdi); 5096 } 5097 5098 BOOL Header_Layout(HWND w, LPHDLAYOUT playout) { 5099 return cast(BOOL) SendMessage(w, HDM_LAYOUT, 0, cast(LPARAM) playout); 5100 } 5101 5102 static if (_WIN32_IE >= 0x300) { 5103 int Header_OrderToIndex(HWND w, int i) { 5104 return cast(int) SendMessage(w, HDM_ORDERTOINDEX, i, 0); 5105 } 5106 5107 BOOL Header_GetItemRect(HWND w, int i, RECT* r) { 5108 return cast(BOOL) SendMessage(w, HDM_GETITEMRECT, i, cast(LPARAM) r); 5109 } 5110 5111 BOOL Header_GetOrderArray(HWND w, int iSize, LPINT lpiArray) { 5112 return cast(BOOL) SendMessage(w, HDM_GETORDERARRAY, iSize, 5113 cast(LPARAM) lpiArray); 5114 } 5115 5116 BOOL Header_SetOrderArray(HWND w, int iSize, LPINT lpiArray) { 5117 return cast(BOOL) SendMessage(w, HDM_SETORDERARRAY, iSize, 5118 cast(LPARAM) lpiArray); 5119 } 5120 5121 HIMAGELIST Header_CreateDragImage(HWND w, int i) { 5122 return cast(HIMAGELIST) SendMessage(w, HDM_CREATEDRAGIMAGE, i, 0); 5123 } 5124 5125 HIMAGELIST Header_SetImageList(HWND w, HIMAGELIST himl) { 5126 return cast(HIMAGELIST) SendMessage(w, HDM_SETIMAGELIST, 0, 5127 cast(LPARAM) himl); 5128 } 5129 5130 HIMAGELIST Header_GetImageList(HWND w) { 5131 return cast(HIMAGELIST) SendMessage(w, HDM_GETIMAGELIST, 0, 0); 5132 } 5133 } 5134 5135 static if (_WIN32_IE >= 0x400) { 5136 BOOL Header_GetUnicodeFormat(HWND w) { 5137 return cast(BOOL) SendMessage(w, HDM_GETUNICODEFORMAT, 0, 0); 5138 } 5139 5140 BOOL Header_SetUnicodeFormat(HWND w, BOOL fUnicode) { 5141 return cast(BOOL) SendMessage(w, HDM_SETUNICODEFORMAT, fUnicode, 0); 5142 } 5143 } 5144 5145 extern (Windows) { 5146 HDSA DSA_Create(INT, INT); 5147 BOOL DSA_Destroy(HDSA); 5148 VOID DSA_DestroyCallback(HDSA, PFNDSAENUMCALLBACK, PVOID); 5149 PVOID DSA_GetItemPtr(HDSA, INT); 5150 INT DSA_InsertItem(HDSA, INT, PVOID); 5151 HDPA DPA_Create(INT); 5152 BOOL DPA_Destroy(HDPA); 5153 PVOID DPA_DeletePtr(HDPA, INT); 5154 BOOL DPA_DeleteAllPtrs(HDPA); 5155 VOID DPA_EnumCallback(HDPA, PFNDPAENUMCALLBACK, PVOID); 5156 VOID DPA_DestroyCallback(HDPA, PFNDPAENUMCALLBACK, PVOID); 5157 BOOL DPA_SetPtr(HDPA, INT, PVOID); 5158 INT DPA_InsertPtr(HDPA, INT, PVOID); 5159 PVOID DPA_GetPtr(HDPA, INT_PTR); 5160 BOOL DPA_Sort(HDPA, PFNDPACOMPARE, LPARAM); 5161 INT DPA_Search(HDPA, PVOID, INT, PFNDPACOMPARE, LPARAM, UINT); 5162 BOOL Str_SetPtrW(LPWSTR*, LPCWSTR); 5163 5164 static if (_WIN32_IE >= 0x400) { 5165 BOOL FlatSB_EnableScrollBar(HWND, INT, UINT); 5166 BOOL FlatSB_ShowScrollBar(HWND, INT, BOOL); 5167 BOOL FlatSB_GetScrollRange(HWND, INT, LPINT, LPINT); 5168 BOOL FlatSB_GetScrollInfo(HWND, INT, LPSCROLLINFO); 5169 INT FlatSB_GetScrollPos(HWND, INT); 5170 BOOL FlatSB_GetScrollProp(HWND, INT, LPINT); 5171 version (Win64) { 5172 BOOL FlatSB_GetScrollPropPtr(HWND, INT, PINT_PTR); 5173 } else { 5174 alias FlatSB_GetScrollProp FlatSB_GetScrollPropPtr; 5175 } 5176 INT FlatSB_SetScrollPos(HWND, INT, INT, BOOL); 5177 INT FlatSB_SetScrollInfo(HWND, INT, LPSCROLLINFO, BOOL); 5178 INT FlatSB_SetScrollRange(HWND, INT, INT, INT, BOOL); 5179 BOOL FlatSB_SetScrollProp(HWND, UINT, INT_PTR, BOOL); 5180 alias FlatSB_SetScrollProp FlatSB_SetScrollPropPtr; 5181 BOOL InitializeFlatSB(HWND); 5182 HRESULT UninitializeFlatSB(HWND); 5183 } 5184 5185 static if (_WIN32_WINNT >= 0x501) { 5186 BOOL SetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR); 5187 BOOL GetWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR*); 5188 BOOL RemoveWindowSubclass(HWND, SUBCLASSPROC, UINT_PTR); 5189 LRESULT DefSubclassProc(HWND, UINT, WPARAM, LPARAM); 5190 INT DrawShadowText(HDC, LPCWSTR, UINT, RECT*, DWORD, COLORREF, 5191 COLORREF, INT, INT); 5192 } 5193 5194 int ImageList_Add(HIMAGELIST, HBITMAP, HBITMAP); 5195 int ImageList_AddMasked(HIMAGELIST, HBITMAP, COLORREF); 5196 BOOL ImageList_BeginDrag(HIMAGELIST, int, int, int); 5197 HIMAGELIST ImageList_Create(int, int, UINT, int, int); 5198 BOOL ImageList_Destroy(HIMAGELIST); 5199 BOOL ImageList_DragEnter(HWND, int, int); 5200 BOOL ImageList_DragLeave(HWND); 5201 BOOL ImageList_DragMove(int, int); 5202 BOOL ImageList_DragShowNolock(BOOL); 5203 BOOL ImageList_Draw(HIMAGELIST, int, HDC, int, int, UINT); 5204 BOOL ImageList_DrawEx(HIMAGELIST, int, HDC, int, int, int, int, COLORREF, 5205 COLORREF, UINT); 5206 void ImageList_EndDrag(); 5207 COLORREF ImageList_GetBkColor(HIMAGELIST); 5208 HIMAGELIST ImageList_GetDragImage(LPPOINT, LPPOINT); 5209 HICON ImageList_GetIcon(HIMAGELIST, int, UINT); 5210 BOOL ImageList_GetIconSize(HIMAGELIST, int*, int*); 5211 int ImageList_GetImageCount(HIMAGELIST); 5212 BOOL ImageList_GetImageInfo(HIMAGELIST, int, IMAGEINFO*); 5213 HIMAGELIST ImageList_LoadImageA(HINSTANCE, LPCSTR, int, int, COLORREF, 5214 UINT, UINT); 5215 HIMAGELIST ImageList_LoadImageW(HINSTANCE, LPCWSTR, int, int, COLORREF, 5216 UINT, UINT); 5217 HIMAGELIST ImageList_Merge(HIMAGELIST, int, HIMAGELIST, int, int, int); 5218 BOOL ImageList_Remove(HIMAGELIST, int); 5219 BOOL ImageList_Replace(HIMAGELIST, int, HBITMAP, HBITMAP); 5220 int ImageList_ReplaceIcon(HIMAGELIST, int, HICON); 5221 COLORREF ImageList_SetBkColor(HIMAGELIST, COLORREF); 5222 BOOL ImageList_SetDragCursorImage(HIMAGELIST, int, int, int); 5223 BOOL ImageList_SetIconSize(HIMAGELIST, int, int); 5224 BOOL ImageList_SetOverlayImage(HIMAGELIST, int, int); 5225 5226 //#ifdef _OBJIDL_H 5227 HIMAGELIST ImageList_Read(LPSTREAM); 5228 BOOL ImageList_Write(HIMAGELIST, LPSTREAM); 5229 //#endif 5230 5231 static if (_WIN32_IE >= 0x400) { 5232 HIMAGELIST ImageList_Duplicate(HIMAGELIST himl); 5233 } 5234 5235 void InitCommonControls(); 5236 5237 static if (_WIN32_IE >= 0x300) { 5238 BOOL InitCommonControlsEx(LPINITCOMMONCONTROLSEX); 5239 } 5240 5241 int LBItemFromPt(HWND, POINT, BOOL); 5242 } 5243 5244 int ImageList_AddIcon(HIMAGELIST himl, HICON hicon) { 5245 return ImageList_ReplaceIcon(himl, -1, hicon); 5246 } 5247 5248 HICON ImageList_ExtractIcon(HINSTANCE hi, HIMAGELIST himl, int i) { 5249 return ImageList_GetIcon(himl, i, 0); 5250 } 5251 5252 HIMAGELIST ImageList_LoadBitmap(HINSTANCE hi, LPCTSTR lpbmp, int cx, 5253 int cGrow, COLORREF crMask) { 5254 return ImageList_LoadImage(hi, lpbmp, cx, cGrow, crMask, IMAGE_BITMAP, 0); 5255 } 5256 5257 BOOL ImageList_RemoveAll(HIMAGELIST himl) { 5258 return ImageList_Remove(himl, -1); 5259 } 5260 5261 COLORREF ListView_GetBkColor(HWND w) { 5262 return cast(COLORREF) SendMessage(w, LVM_GETBKCOLOR, 0, 0); 5263 } 5264 5265 HIMAGELIST ListView_GetImageList(HWND w, int i) { 5266 return cast(HIMAGELIST) SendMessage(w, LVM_GETIMAGELIST, i, 0); 5267 } 5268 5269 int ListView_GetItemCount(HWND w) { 5270 return cast(int) SendMessage(w, LVM_GETITEMCOUNT, 0, 0); 5271 } 5272 5273 BOOL ListView_GetItem(HWND w, LPLVITEM pitem) { 5274 return cast(BOOL) SendMessage(w, LVM_GETITEM, 0, cast(LPARAM) pitem); 5275 } 5276 5277 BOOL ListView_SetBkColor(HWND w, COLORREF c) { 5278 return cast(BOOL) SendMessage(w, LVM_SETBKCOLOR, 0, cast(LPARAM) c); 5279 } 5280 5281 HIMAGELIST ListView_SetImageList(HWND w, HIMAGELIST h, int i) { 5282 return cast(HIMAGELIST) SendMessage(w, LVM_SETIMAGELIST, i, 5283 cast(LPARAM) h); 5284 } 5285 5286 BOOL ListView_SetItem(HWND w, const(LV_ITEM)* i) { 5287 return cast(BOOL) SendMessage(w, LVM_SETITEM, 0, cast(LPARAM) i); 5288 } 5289 5290 int ListView_InsertItem(HWND w, const(LV_ITEM)* i) { 5291 return cast(int) SendMessage(w, LVM_INSERTITEM, 0, cast(LPARAM) i); 5292 } 5293 5294 BOOL ListView_DeleteItem(HWND w, int i) { 5295 return cast(BOOL) SendMessage(w, LVM_DELETEITEM, i, 0); 5296 } 5297 5298 BOOL ListView_DeleteAllItems(HWND w) { 5299 return cast(BOOL) SendMessage(w, LVM_DELETEALLITEMS, 0, 0); 5300 } 5301 5302 UINT ListView_GetCallbackMask(HWND w) { 5303 return cast(UINT) SendMessage(w, LVM_GETCALLBACKMASK, 0, 0); 5304 } 5305 5306 BOOL ListView_SetCallbackMask(HWND w, UINT m) { 5307 return cast(BOOL) SendMessage(w, LVM_SETCALLBACKMASK, m, 0); 5308 } 5309 5310 int ListView_GetNextItem(HWND w, int i, UINT f) { 5311 return cast(int) SendMessage(w, LVM_GETNEXTITEM, i, MAKELPARAM(cast(ushort)f, 0)); 5312 } 5313 5314 int ListView_FindItem(HWND w, int i, const(LV_FINDINFO)* p) { 5315 return cast(int) SendMessage(w, LVM_FINDITEM, i, cast(LPARAM) p); 5316 } 5317 5318 BOOL ListView_GetItemRect(HWND w, int i, LPRECT p, int c) { 5319 if (p) 5320 p.left = c; 5321 return cast(BOOL) SendMessage(w, LVM_GETITEMRECT, i, cast(LPARAM) p); 5322 } 5323 5324 BOOL ListView_SetItemPosition(HWND w, int i, int x, int y) { 5325 return cast(BOOL) SendMessage(w, LVM_SETITEMPOSITION, i, MAKELPARAM(cast(ushort)x, cast(ushort)y)); 5326 } 5327 5328 BOOL ListView_GetItemPosition(HWND w, int i, POINT* p) { 5329 return cast(BOOL) SendMessage(w, LVM_GETITEMPOSITION, i, cast(LPARAM) p); 5330 } 5331 5332 DWORD ListView_GetItemSpacing(HWND w, BOOL f) { 5333 return cast(DWORD) SendMessage(w, LVM_GETITEMSPACING, f, 0); 5334 } 5335 5336 int ListView_GetStringWidth(HWND w, LPCSTR s) { 5337 return cast(int) SendMessage(w, LVM_GETSTRINGWIDTH, 0, cast(LPARAM) s); 5338 } 5339 5340 int ListView_HitTest(HWND w, LPLVHITTESTINFO p) { 5341 return cast(int) SendMessage(w, LVM_HITTEST, 0, cast(LPARAM) p); 5342 } 5343 5344 BOOL ListView_EnsureVisible(HWND w, int i, BOOL f) { 5345 return cast(BOOL) SendMessage(w, LVM_ENSUREVISIBLE, i, MAKELPARAM(cast(ushort)f, 0)); 5346 } 5347 5348 BOOL ListView_Scroll(HWND w, int dx, int dy) { 5349 return cast(BOOL) SendMessage(w, LVM_SCROLL, dx, dy); 5350 } 5351 5352 BOOL ListView_RedrawItems(HWND w, int f, int l) { 5353 return cast(BOOL) SendMessage(w, LVM_REDRAWITEMS, f, l); 5354 } 5355 5356 BOOL ListView_Arrange(HWND w, UINT c) { 5357 return cast(BOOL) SendMessage(w, LVM_ARRANGE, c, 0); 5358 } 5359 5360 HWND ListView_EditLabel(HWND w, int i) { 5361 return cast(HWND) SendMessage(w, LVM_EDITLABEL, i, 0); 5362 } 5363 5364 HWND ListView_GetEditControl(HWND w) { 5365 return cast(HWND) SendMessage(w, LVM_GETEDITCONTROL, 0, 0); 5366 } 5367 5368 BOOL ListView_GetColumn(HWND w, int i, LPLVCOLUMN p) { 5369 return cast(BOOL) SendMessage(w, LVM_GETCOLUMN, i, cast(LPARAM) p); 5370 } 5371 5372 BOOL ListView_SetColumn(HWND w, int i, const(LV_COLUMN)* p) { 5373 return cast(BOOL) SendMessage(w, LVM_SETCOLUMN, i, cast(LPARAM) p); 5374 } 5375 5376 int ListView_InsertColumn(HWND w, int i, const(LV_COLUMN)* p) { 5377 return cast(int) SendMessage(w, LVM_INSERTCOLUMN, i, cast(LPARAM) p); 5378 } 5379 5380 BOOL ListView_DeleteColumn(HWND w, int i) { 5381 return cast(BOOL) SendMessage(w, LVM_DELETECOLUMN, i, 0); 5382 } 5383 5384 int ListView_GetColumnWidth(HWND w, int i) { 5385 return cast(int) SendMessage(w, LVM_GETCOLUMNWIDTH, i, 0); 5386 } 5387 5388 BOOL ListView_SetColumnWidth(HWND w, int i, int x) { 5389 return cast(BOOL) SendMessage(w, LVM_SETCOLUMNWIDTH, i, MAKELPARAM(cast(ushort)x, 0)); 5390 } 5391 5392 HIMAGELIST ListView_CreateDragImage(HWND w, int i, LPPOINT p) { 5393 return cast(HIMAGELIST) SendMessage(w, LVM_CREATEDRAGIMAGE, i, 5394 cast(LPARAM) p); 5395 } 5396 5397 BOOL ListView_GetViewRect(HWND w, RECT* p) { 5398 return cast(BOOL) SendMessage(w, LVM_GETVIEWRECT, 0, cast(LPARAM) p); 5399 } 5400 5401 COLORREF ListView_GetTextColor(HWND w) { 5402 return cast(COLORREF) SendMessage(w, LVM_GETTEXTCOLOR, 0, 0); 5403 } 5404 5405 BOOL ListView_SetTextColor(HWND w, COLORREF c) { 5406 return cast(BOOL) SendMessage(w, LVM_SETTEXTCOLOR, 0, cast(LPARAM) c); 5407 } 5408 5409 COLORREF ListView_GetTextBkColor(HWND w) { 5410 return cast(COLORREF) SendMessage(w, LVM_GETTEXTBKCOLOR, 0, 0); 5411 } 5412 5413 BOOL ListView_SetTextBkColor(HWND w, COLORREF c) { 5414 return cast(BOOL) SendMessage(w, LVM_SETTEXTBKCOLOR, 0, cast(LPARAM) c); 5415 } 5416 5417 int ListView_GetTopIndex(HWND w) { 5418 return cast(int) SendMessage(w, LVM_GETTOPINDEX, 0, 0); 5419 } 5420 5421 int ListView_GetCountPerPage(HWND w) { 5422 return cast(int) SendMessage(w, LVM_GETCOUNTPERPAGE, 0, 0); 5423 } 5424 5425 BOOL ListView_GetOrigin(HWND w, LPPOINT p) { 5426 return cast(BOOL) SendMessage(w, LVM_GETORIGIN, 0, cast(LPARAM) p); 5427 } 5428 5429 BOOL ListView_Update(HWND w, WPARAM i) { 5430 return cast(BOOL) SendMessage(w, LVM_UPDATE, i, 0); 5431 } 5432 5433 void ListView_SetItemState(HWND w, int i, UINT d, UINT m) { 5434 LV_ITEM _lvi; 5435 _lvi.stateMask = m; 5436 _lvi.state = d; 5437 SendMessage(w, LVM_SETITEMSTATE, i, cast(LPARAM) &_lvi); 5438 } 5439 5440 UINT ListView_GetItemState(HWND w, int i, UINT m) { 5441 return cast(UINT) SendMessage(w, LVM_GETITEMSTATE, i, m); 5442 } 5443 5444 void ListView_GetItemText(HWND w, int i, int iS, LPTSTR s, int n) { 5445 LV_ITEM _lvi; 5446 _lvi.iSubItem = iS; 5447 _lvi.cchTextMax = n; 5448 _lvi.pszText = s; 5449 SendMessage(w, LVM_GETITEMTEXT, i, cast(LPARAM) &_lvi); 5450 } 5451 5452 void ListView_SetItemText(HWND w, int i, int iS, LPTSTR s) { 5453 LV_ITEM _lvi; 5454 _lvi.iSubItem = iS; 5455 _lvi.pszText = s; 5456 SendMessage(w, LVM_SETITEMTEXT, i, cast(LPARAM) &_lvi); 5457 } 5458 5459 void ListView_SetItemCount(HWND w, int n) { 5460 SendMessage(w, LVM_SETITEMCOUNT, n, 0); 5461 } 5462 5463 BOOL ListView_SortItems(HWND w, PFNLVCOMPARE f, LPARAM l) { 5464 return cast(BOOL) SendMessage(w, LVM_SORTITEMS, l, cast(LPARAM) f); 5465 } 5466 5467 void ListView_SetItemPosition32(HWND w, int i, int x, int y) { 5468 POINT p; 5469 p.x = x; 5470 p.y = y; 5471 SendMessage(w, LVM_SETITEMPOSITION32, i, cast(LPARAM) &p); 5472 } 5473 5474 UINT ListView_GetSelectedCount(HWND w) { 5475 return cast(UINT) SendMessage(w, LVM_GETSELECTEDCOUNT, 0, 0); 5476 } 5477 5478 UINT ListView_GetCheckState(HWND w, UINT i) { 5479 return ((cast(UINT) SendMessage(w, LVM_GETITEMSTATE, i, LVIS_STATEIMAGEMASK)) >> 12) - 1; 5480 } 5481 5482 void ListView_SetCheckState(HWND w, UINT i, BOOL f) { 5483 ListView_SetItemState(w, i, INDEXTOSTATEIMAGEMASK(f ? 2 : 1), 5484 LVIS_STATEIMAGEMASK); 5485 } 5486 5487 BOOL ListView_GetISearchString(HWND w, LPSTR lpsz) { 5488 return cast(BOOL) SendMessage(w, LVM_GETISEARCHSTRING, 0, 5489 cast(LPARAM) lpsz); 5490 } 5491 5492 void ListView_CancelEditLabel(HWND w) { 5493 SendMessage(w, LVM_CANCELEDITLABEL, 0, 0); 5494 } 5495 5496 int ListView_EnableGroupView(HWND w, BOOL i) { 5497 return cast(int) SendMessage(w, LVM_ENABLEGROUPVIEW, i, 0); 5498 } 5499 5500 //static if (_WIN32_WINNT >= 0x500 || _WIN32_IE >= 0x500) { 5501 BOOL ListView_SortItemsEx(HWND w, PFNLVCOMPARE c, LPARAM p) { 5502 return cast(BOOL) SendMessage(w, LVM_SORTITEMSEX, cast(WPARAM) p, cast(LPARAM)c); 5503 } 5504 //} 5505 5506 static if (_WIN32_WINNT >= 0x501) { 5507 int ListView_GetGroupInfo(HWND w, int i, PLVGROUP p) { 5508 return cast(int) SendMessage(w, LVM_GETGROUPINFO, i, cast(LPARAM) p); 5509 } 5510 5511 void ListView_GetGroupMetrics(HWND w, PLVGROUPMETRICS p) { 5512 SendMessage(w, LVM_GETGROUPMETRICS, 0, cast(LPARAM) p); 5513 } 5514 5515 BOOL ListView_GetInsertMark(HWND w, PLVINSERTMARK p) { 5516 return cast(BOOL) SendMessage(w, LVM_GETINSERTMARK, 0, cast(LPARAM) p); 5517 } 5518 5519 COLORREF ListView_GetInsertMarkColor(HWND w) { 5520 return cast(COLORREF) SendMessage(w, LVM_GETINSERTMARKCOLOR, 0, 0); 5521 } 5522 5523 int ListView_GetInsertMarkRect(HWND w, LPRECT p) { 5524 return cast(int) SendMessage(w, LVM_GETINSERTMARKRECT, 0, cast(LPARAM) p); 5525 } 5526 5527 COLORREF ListView_GetOutlineColor(HWND w) { 5528 return cast(COLORREF) SendMessage(w, LVM_GETOUTLINECOLOR, 0, 0); 5529 } 5530 5531 UINT ListView_GetSelectedColumn(HWND w) { 5532 return cast(UINT) SendMessage(w, LVM_GETSELECTEDCOLUMN, 0, 0); 5533 } 5534 5535 void ListView_GetTileInfo(HWND w, PLVTILEINFO p) { 5536 SendMessage(w, LVM_GETTILEINFO, 0, cast(LPARAM) p); 5537 } 5538 5539 void ListView_GetTileViewInfo(HWND w, PLVTILEVIEWINFO p) { 5540 SendMessage(w, LVM_GETTILEVIEWINFO, 0, cast(LPARAM) p); 5541 } 5542 5543 DWORD ListView_GetView(HWND w) { 5544 return cast(DWORD) SendMessage(w, LVM_GETVIEW, 0, 0); 5545 } 5546 5547 BOOL ListView_HasGroup(HWND w, int i) { 5548 return cast(BOOL) SendMessage(w, LVM_HASGROUP, i, 0); 5549 } 5550 5551 int ListView_InsertGroup(HWND w, int i, PLVGROUP p) { 5552 return cast(int) SendMessage(w, LVM_INSERTGROUP, i, cast(LPARAM) p); 5553 } 5554 5555 void ListView_InsertGroupSorted(HWND w, PLVINSERTGROUPSORTED p) { 5556 SendMessage(w, LVM_INSERTGROUPSORTED, cast(WPARAM) p, 0); 5557 } 5558 5559 BOOL ListView_InsertMarkHitTest(HWND w, LPPOINT p, PLVINSERTMARK t) { 5560 return cast(BOOL) SendMessage(w, LVM_INSERTMARKHITTEST, cast(WPARAM) p, cast(LPARAM) t); 5561 } 5562 5563 BOOL ListView_IsGroupViewEnabled(HWND w) { 5564 return cast(BOOL) SendMessage(w, LVM_ISGROUPVIEWENABLED, 0, 0); 5565 } 5566 5567 UINT ListView_MapIDToIndex(HWND w, UINT i) { 5568 return cast(UINT) SendMessage(w, LVM_MAPIDTOINDEX, i, 0); 5569 } 5570 5571 /* ??? MSDN documents this as "Not implemented", except in relation to 5572 * Windows CE/Mobile. 5573 */ 5574 void ListView_MoveGroup(HWND w, int i, int t) { 5575 SendMessage(w, LVM_MOVEGROUP, i, t); 5576 } 5577 5578 void ListView_RemoveAllGroups(HWND w) { 5579 SendMessage(w, LVM_REMOVEALLGROUPS, 0, 0); 5580 } 5581 5582 int ListView_RemoveGroup(HWND w, int i) { 5583 return cast(int) SendMessage(w, LVM_REMOVEGROUP, i, 0); 5584 } 5585 5586 int ListView_SetGroupInfo(HWND w, int i, PLVGROUP p) { 5587 return cast(int) SendMessage(w, LVM_SETGROUPINFO, i, cast(LPARAM) p); 5588 } 5589 5590 void ListView_SetGroupMetrics(HWND w, PLVGROUPMETRICS p) { 5591 SendMessage(w, LVM_SETGROUPMETRICS, 0, cast(LPARAM) p); 5592 } 5593 5594 BOOL ListView_SetInfoTip(HWND w, PLVSETINFOTIP p) { 5595 return cast(BOOL) SendMessage(w, LVM_SETINFOTIP, 0, cast(LPARAM) p); 5596 } 5597 5598 BOOL ListView_SetInsertMark(HWND w, PLVINSERTMARK p) { 5599 return cast(BOOL) SendMessage(w, LVM_SETINSERTMARK, 0, cast(LPARAM) p); 5600 } 5601 5602 COLORREF ListView_SetInsertMarkColor(HWND w, COLORREF c) { 5603 return cast(COLORREF) SendMessage(w, LVM_SETINSERTMARKCOLOR, 0, c); 5604 } 5605 5606 COLORREF ListView_SetOutlineColor(HWND w, COLORREF c) { 5607 return cast(COLORREF) SendMessage(w, LVM_SETOUTLINECOLOR, 0, c); 5608 } 5609 5610 void ListView_SetSelectedColumn(HWND w, int i) { 5611 SendMessage(w, LVM_SETSELECTEDCOLUMN, i, 0); 5612 } 5613 5614 BOOL ListView_SetTileInfo(HWND w, PLVTILEINFO p) { 5615 return cast(BOOL) SendMessage(w, LVM_SETTILEINFO, 0, cast(LPARAM) p); 5616 } 5617 5618 BOOL ListView_SetTileViewInfo(HWND w, PLVTILEVIEWINFO p) { 5619 return cast(BOOL) SendMessage(w, LVM_SETTILEVIEWINFO, 0, cast(LPARAM) p); 5620 } 5621 5622 int ListView_SetView(HWND w, DWORD i) { 5623 return cast(int) SendMessage(w, LVM_SETVIEW, i, 0); 5624 } 5625 5626 int ListView_SortGroups(HWND w, PFNLVGROUPCOMPARE c, LPVOID p) { 5627 return cast(int) SendMessage(w, LVM_SORTGROUPS, cast(WPARAM) c, cast(LPARAM) p); 5628 } 5629 } 5630 5631 static if (_WIN32_WINNT >= 0x501) { 5632 enum { 5633 CBM_FIRST = 0x1700, 5634 CB_SETMINVISIBLE = CBM_FIRST + 1, 5635 CB_GETMINVISIBLE = CBM_FIRST + 2, 5636 CB_SETCUEBANNER = CBM_FIRST + 3, 5637 CB_GETCUEBANNER = CBM_FIRST + 4, 5638 } 5639 5640 BOOL ComboBox_SetMinVisible(HWND w, INT i) { 5641 return cast(BOOL) SendMessage(w, CB_SETMINVISIBLE, cast(WPARAM) i, 0); 5642 } 5643 5644 int ComboBox_GetMinVisible(HWND w) { 5645 return cast(int) SendMessage(w, CB_GETMINVISIBLE, 0, 0); 5646 } 5647 } 5648 5649 extern (Windows) BOOL MakeDragList(HWND); 5650 extern (Windows) void MenuHelp(UINT, WPARAM, LPARAM, HMENU, HINSTANCE, HWND, 5651 PUINT); 5652 5653 COLORREF MonthCal_GetColor(HWND hwnd, INT icolor) { 5654 return cast(COLORREF) SendMessage(hwnd, MCM_GETCOLOR, 5655 cast(WPARAM) icolor, 0); 5656 } 5657 5658 BOOL MonthCal_GetCurSel(HWND hwnd, LPSYSTEMTIME lpsystime) { 5659 return cast(BOOL) SendMessage(hwnd, MCM_GETCURSEL, 0, 5660 cast(LPARAM) lpsystime); 5661 } 5662 5663 DWORD MonthCal_GetFirstDayOfWeek(HWND hwnd) { 5664 return cast(DWORD) SendMessage(hwnd, MCM_GETFIRSTDAYOFWEEK, 0, 0); 5665 } 5666 5667 DWORD MonthCal_GetMaxSelCount(HWND hwnd) { 5668 return cast(DWORD) SendMessage(hwnd, MCM_GETMAXSELCOUNT, 0, 0); 5669 } 5670 5671 DWORD MonthCal_GetMaxTodayWidth(HWND hwnd) { 5672 return cast(DWORD) SendMessage(hwnd, MCM_GETMAXTODAYWIDTH, 0, 0); 5673 } 5674 5675 BOOL MonthCal_GetMinReqRect(HWND hwnd, LPRECT lpRectInfo) { 5676 return cast(BOOL) SendMessage(hwnd, MCM_GETMINREQRECT, 0, 5677 cast(LPARAM) lpRectInfo); 5678 } 5679 5680 INT MonthCal_GetMonthDelta(HWND hwnd) { 5681 return cast(INT) SendMessage(hwnd, MCM_GETMONTHDELTA, 0, 0); 5682 } 5683 5684 INT MonthCal_GetMonthRange(HWND hwnd, DWORD flag, LPSYSTEMTIME systimearray) { 5685 return cast(INT) SendMessage(hwnd, MCM_GETMONTHRANGE, cast(WPARAM) flag, 5686 cast(LPARAM) systimearray); 5687 } 5688 5689 DWORD MonthCal_GetRange(HWND hwnd, LPSYSTEMTIME systimearray) { 5690 return cast(DWORD) SendMessage(hwnd, MCM_GETRANGE, 0, 5691 cast(LPARAM) systimearray); 5692 } 5693 5694 BOOL MonthCal_GetSelRange(HWND hwnd, LPSYSTEMTIME systimearray) { 5695 return cast(BOOL) SendMessage(hwnd, MCM_GETSELRANGE, 0, 5696 cast(LPARAM) systimearray); 5697 } 5698 5699 BOOL MonthCal_GetToday(HWND hwnd, LPSYSTEMTIME systime) { 5700 return cast(BOOL) SendMessage(hwnd, MCM_GETTODAY, 0, 5701 cast(LPARAM) systime); 5702 } 5703 5704 BOOL MonthCal_GetUnicodeFormat(HWND hwnd) { 5705 return cast(BOOL) SendMessage(hwnd, MCM_GETUNICODEFORMAT, 0, 0); 5706 } 5707 5708 DWORD MonthCal_HitTest(HWND hwnd, PMCHITTESTINFO pmchittest) { 5709 return cast(DWORD) SendMessage(hwnd, MCM_HITTEST, 0, 5710 cast(LPARAM) pmchittest); 5711 } 5712 5713 COLORREF MonthCal_SetColor(HWND hwnd, INT icolor, COLORREF clr) { 5714 return cast(COLORREF) SendMessage(hwnd, MCM_SETCOLOR, cast(WPARAM) icolor, 5715 cast(LPARAM) clr); 5716 } 5717 5718 BOOL MonthCal_SetCurSel(HWND hwnd, LPSYSTEMTIME lpsystime) { 5719 return cast(BOOL) SendMessage(hwnd, MCM_SETCURSEL, 0, 5720 cast(LPARAM) lpsystime); 5721 } 5722 5723 BOOL MonthCal_SetDayState(HWND hwnd, INT imonths, LPMONTHDAYSTATE lpdatestatearray) { 5724 return cast(BOOL) SendMessage(hwnd, MCM_SETDAYSTATE, cast(WPARAM) imonths, 5725 cast(LPARAM) lpdatestatearray); 5726 } 5727 5728 DWORD MonthCal_SetFirstDayOfWeek(HWND hwnd, INT iday) { 5729 return cast(DWORD) SendMessage(hwnd, MCM_SETFIRSTDAYOFWEEK, 0, 5730 cast(LPARAM) iday); 5731 } 5732 5733 BOOL MonthCal_SetMaxSelCount(HWND hwnd, UINT imax) { 5734 return cast(BOOL) SendMessage(hwnd, MCM_SETMAXSELCOUNT, 5735 cast(WPARAM) imax, 0); 5736 } 5737 5738 INT MonthCal_SetMonthDelta(HWND hwnd, INT idelta) { 5739 return cast(INT) SendMessage(hwnd, MCM_SETMONTHDELTA, cast(WPARAM) idelta, 0); 5740 } 5741 5742 BOOL MonthCal_SetSelRange(HWND hwnd, LPSYSTEMTIME systimearray) { 5743 return cast(BOOL) SendMessage(hwnd, MCM_SETSELRANGE, 0, 5744 cast(LPARAM) systimearray); 5745 } 5746 5747 void MonthCal_SetToday(HWND hwnd, LPSYSTEMTIME systime) { 5748 SendMessage(hwnd, MCM_SETTODAY, 0, cast(LPARAM) systime); 5749 } 5750 5751 BOOL MonthCal_SetUnicodeFormat(HWND hwnd, BOOL unicode) { 5752 return cast(BOOL) SendMessage(hwnd, MCM_SETUNICODEFORMAT, 5753 cast(WPARAM) unicode, 0); 5754 } 5755 5756 BOOL MonthCal_SetRange(HWND w, DWORD f, LPSYSTEMTIME st) { 5757 return cast(BOOL) SendMessage(w, MCM_SETRANGE, cast(WPARAM) f, 5758 cast(LPARAM) st); 5759 } 5760 5761 extern (Windows) BOOL ShowHideMenuCtl(HWND, UINT_PTR, PINT); 5762 5763 BOOL TabCtrl_GetItem(HWND w, int i, LPTCITEM p) { 5764 return cast(BOOL) SendMessage(w, TCM_GETITEM, i, cast(LPARAM) p); 5765 } 5766 5767 BOOL TabCtrl_SetItem(HWND w, int i, LPTCITEM p) { 5768 return cast(BOOL) SendMessage(w, TCM_SETITEM, i, cast(LPARAM) p); 5769 } 5770 5771 int TabCtrl_InsertItem(HWND w, int i, const(TC_ITEM)* p) { 5772 return cast(int) SendMessage(w, TCM_INSERTITEM, i, cast(LPARAM) p); 5773 } 5774 5775 BOOL TabCtrl_DeleteItem(HWND w, int i) { 5776 return cast(BOOL) SendMessage(w, TCM_DELETEITEM, i, 0); 5777 } 5778 5779 BOOL TabCtrl_DeleteAllItems(HWND w) { 5780 return cast(BOOL) SendMessage(w, TCM_DELETEALLITEMS, 0, 0); 5781 } 5782 5783 BOOL TabCtrl_GetItemRect(HWND w, int i, LPRECT p) { 5784 return cast(BOOL) SendMessage(w, TCM_GETITEMRECT, i, cast(LPARAM) p); 5785 } 5786 5787 int TabCtrl_GetCurSel(HWND w) { 5788 return cast(int) SendMessage(w, TCM_GETCURSEL, 0, 0); 5789 } 5790 5791 int TabCtrl_SetCurSel(HWND w, int i) { 5792 return cast(int) SendMessage(w, TCM_SETCURSEL, i, 0); 5793 } 5794 5795 int TabCtrl_HitTest(HWND w, LPTCHITTESTINFO p) { 5796 return cast(int) SendMessage(w, TCM_HITTEST, 0, cast(LPARAM) p); 5797 } 5798 5799 BOOL TabCtrl_SetItemExtra(HWND w, int c) { 5800 return cast(BOOL) SendMessage(w, TCM_SETITEMEXTRA, c, 0); 5801 } 5802 5803 int TabCtrl_AdjustRect(HWND w, BOOL b, LPRECT p) { 5804 return cast(int) SendMessage(w, TCM_ADJUSTRECT, b, cast(LPARAM) p); 5805 } 5806 5807 DWORD TabCtrl_SetItemSize(HWND w, int x, int y) { 5808 return cast(DWORD) SendMessage(w, TCM_SETITEMSIZE, 0, MAKELPARAM(cast(ushort)x, cast(ushort)y)); 5809 } 5810 5811 void TabCtrl_RemoveImage(HWND w, int i) { 5812 SendMessage(w, TCM_REMOVEIMAGE, i, 0); 5813 } 5814 5815 void TabCtrl_SetPadding(HWND w, int x, int y) { 5816 SendMessage(w, TCM_SETPADDING, 0, MAKELPARAM(cast(ushort)x, cast(ushort)y)); 5817 } 5818 5819 int TabCtrl_GetRowCount(HWND w) { 5820 return cast(int) SendMessage(w, TCM_GETROWCOUNT, 0, 0); 5821 } 5822 5823 HWND TabCtrl_GetToolTips(HWND w) { 5824 return cast(HWND) SendMessage(w, TCM_GETTOOLTIPS, 0, 0); 5825 } 5826 5827 void TabCtrl_SetToolTips(HWND w, HWND t) { 5828 SendMessage(w, TCM_SETTOOLTIPS, cast(WPARAM) t, 0); 5829 } 5830 5831 int TabCtrl_GetCurFocus(HWND w) { 5832 return cast(int) SendMessage(w, TCM_GETCURFOCUS, 0, 0); 5833 } 5834 5835 void TabCtrl_SetCurFocus(HWND w, int i) { 5836 SendMessage(w, TCM_SETCURFOCUS, i, 0); 5837 } 5838 5839 HIMAGELIST TabCtrl_GetImageList(HWND w) { 5840 return cast(HIMAGELIST) SendMessage(w, TCM_GETIMAGELIST, 0, 0); 5841 } 5842 5843 HIMAGELIST TabCtrl_SetImageList(HWND w, HIMAGELIST h) { 5844 return cast(HIMAGELIST) SendMessage(w, TCM_SETIMAGELIST, 0, 5845 cast(LPARAM) h); 5846 } 5847 5848 int TabCtrl_GetItemCount(HWND w) { 5849 return cast(int) SendMessage(w, TCM_GETITEMCOUNT, 0, 0); 5850 } 5851 5852 extern (Windows) BOOL _TrackMouseEvent(LPTRACKMOUSEEVENT); 5853 5854 HTREEITEM TreeView_InsertItem(HWND w, LPTVINSERTSTRUCT i) { 5855 return cast(HTREEITEM) SendMessage(w, TVM_INSERTITEM, 0, cast(LPARAM) i); 5856 } 5857 5858 BOOL TreeView_DeleteItem(HWND w, HTREEITEM i) { 5859 return cast(BOOL) SendMessage(w, TVM_DELETEITEM, 0, cast(LPARAM) i); 5860 } 5861 5862 BOOL TreeView_DeleteAllItems(HWND w) { 5863 return cast(BOOL) SendMessage(w, TVM_DELETEITEM, 0, cast(LPARAM) TVI_ROOT); 5864 } 5865 5866 BOOL TreeView_Expand(HWND w, HTREEITEM i, UINT c) { 5867 return cast(BOOL) SendMessage(w, TVM_EXPAND, c, cast(LPARAM) i); 5868 } 5869 5870 BOOL TreeView_GetItemRect(HWND w, HTREEITEM i, LPRECT p, BOOL c) { 5871 *cast(HTREEITEM*) p = i; 5872 return cast(BOOL) SendMessage(w, TVM_GETITEMRECT, c, cast(LPARAM) p); 5873 } 5874 5875 UINT TreeView_GetCount(HWND w) { 5876 return cast(UINT) SendMessage(w, TVM_GETCOUNT, 0, 0); 5877 } 5878 5879 UINT TreeView_GetIndent(HWND w) { 5880 return cast(UINT) SendMessage(w, TVM_GETINDENT, 0, 0); 5881 } 5882 5883 BOOL TreeView_SetIndent(HWND w, INT i) { 5884 return cast(BOOL) SendMessage(w, TVM_SETINDENT, i, 0); 5885 } 5886 5887 HIMAGELIST TreeView_GetImageList(HWND w, INT i) { 5888 return cast(HIMAGELIST) SendMessage(w, TVM_GETIMAGELIST, i, 0); 5889 } 5890 5891 HIMAGELIST TreeView_SetImageList(HWND w, HIMAGELIST h, INT i) { 5892 return cast(HIMAGELIST) SendMessage(w, TVM_SETIMAGELIST, i, 5893 cast(LPARAM) h); 5894 } 5895 5896 HTREEITEM TreeView_GetNextItem(HWND w, HTREEITEM i, UINT c) { 5897 return cast(HTREEITEM) SendMessage(w, TVM_GETNEXTITEM, c, cast(LPARAM) i); 5898 } 5899 5900 HTREEITEM TreeView_GetChild(HWND w, HTREEITEM i) { 5901 return TreeView_GetNextItem(w, i, TVGN_CHILD); 5902 } 5903 5904 HTREEITEM TreeView_GetNextSibling(HWND w, HTREEITEM i) { 5905 return TreeView_GetNextItem(w, i, TVGN_NEXT); 5906 } 5907 5908 HTREEITEM TreeView_GetPrevSibling(HWND w, HTREEITEM i) { 5909 return TreeView_GetNextItem(w, i, TVGN_PREVIOUS); 5910 } 5911 5912 HTREEITEM TreeView_GetParent(HWND w, HTREEITEM i) { 5913 return TreeView_GetNextItem(w, i, TVGN_PARENT); 5914 } 5915 5916 HTREEITEM TreeView_GetFirstVisible(HWND w) { 5917 return TreeView_GetNextItem(w, null, TVGN_FIRSTVISIBLE); 5918 } 5919 5920 HTREEITEM TreeView_GetNextVisible(HWND w, HTREEITEM i) { 5921 return TreeView_GetNextItem(w, i, TVGN_NEXTVISIBLE); 5922 } 5923 5924 HTREEITEM TreeView_GetPrevVisible(HWND w, HTREEITEM i) { 5925 return TreeView_GetNextItem(w, i, TVGN_PREVIOUSVISIBLE); 5926 } 5927 5928 HTREEITEM TreeView_GetSelection(HWND w) { 5929 return TreeView_GetNextItem(w, null, TVGN_CARET); 5930 } 5931 5932 HTREEITEM TreeView_GetDropHilight(HTREEITEM w) { 5933 return TreeView_GetNextItem(w, null, TVGN_DROPHILITE); 5934 } 5935 5936 HTREEITEM TreeView_GetRoot(HWND w) { 5937 return TreeView_GetNextItem(w, null, TVGN_ROOT); 5938 } 5939 5940 BOOL TreeView_Select(HWND w, HTREEITEM i, UINT c) { 5941 return cast(BOOL) SendMessage(w, TVM_SELECTITEM, c, cast(LPARAM) i); 5942 } 5943 5944 BOOL TreeView_SelectItem(HWND w, HTREEITEM i) { 5945 return TreeView_Select(w, i, TVGN_CARET); 5946 } 5947 5948 BOOL TreeView_SelectDropTarget(HWND w, HTREEITEM i) { 5949 return TreeView_Select(w, i, TVGN_DROPHILITE); 5950 } 5951 5952 BOOL TreeView_SelectSetFirstVisible(HWND w, HTREEITEM i) { 5953 return TreeView_Select(w, i, TVGN_FIRSTVISIBLE); 5954 } 5955 5956 BOOL TreeView_GetItem(HWND w, LPTVITEM i) { 5957 return cast(BOOL) SendMessage(w, TVM_GETITEM, 0, cast(LPARAM) i); 5958 } 5959 5960 BOOL TreeView_SetItem(HWND w, const(TV_ITEM)* i) { 5961 return cast(BOOL) SendMessage(w, TVM_SETITEM, 0, cast(LPARAM) i); 5962 } 5963 5964 HWND TreeView_EditLabel(HWND w, HTREEITEM i) { 5965 return cast(HWND) SendMessage(w, TVM_EDITLABEL, 0, cast(LPARAM) i); 5966 } 5967 5968 HWND TreeView_GetEditControl(HWND w) { 5969 return cast(HWND) SendMessage(w, TVM_GETEDITCONTROL, 0, 0); 5970 } 5971 5972 UINT TreeView_GetVisibleCount(HWND w) { 5973 return cast(UINT) SendMessage(w, TVM_GETVISIBLECOUNT, 0, 0); 5974 } 5975 5976 HTREEITEM TreeView_HitTest(HWND w, LPTVHITTESTINFO p) { 5977 return cast(HTREEITEM) SendMessage(w, TVM_HITTEST, 0, cast(LPARAM) p); 5978 } 5979 5980 HIMAGELIST TreeView_CreateDragImage(HWND w, HTREEITEM i) { 5981 return cast(HIMAGELIST) SendMessage(w, TVM_CREATEDRAGIMAGE, 0, 5982 cast(LPARAM) i); 5983 } 5984 5985 BOOL TreeView_SortChildren(HWND w, HTREEITEM i, BOOL r) { 5986 return cast(BOOL) SendMessage(w, TVM_SORTCHILDREN, r, cast(LPARAM) i); 5987 } 5988 5989 BOOL TreeView_EnsureVisible(HWND w, HTREEITEM i) { 5990 return cast(BOOL) SendMessage(w, TVM_ENSUREVISIBLE, 0, cast(LPARAM) i); 5991 } 5992 5993 BOOL TreeView_SortChildrenCB(HWND w, LPTVSORTCB s, BOOL r) { 5994 return cast(BOOL) SendMessage(w, TVM_SORTCHILDRENCB, r, cast(LPARAM) s); 5995 } 5996 5997 BOOL TreeView_EndEditLabelNow(HWND w, BOOL f) { 5998 return cast(BOOL) SendMessage(w, TVM_ENDEDITLABELNOW, f, 0); 5999 } 6000 6001 BOOL TreeView_GetISearchString(HWND w, LPTSTR s) { 6002 return cast(BOOL) SendMessage(w, TVM_GETISEARCHSTRING, 0, cast(LPARAM) s); 6003 } 6004 6005 static if (_WIN32_IE >= 0x300) { 6006 DWORD ListView_ApproximateViewRect(HWND w, int iw, int ih, int i) { 6007 return cast(DWORD) SendMessage(w, LVM_APPROXIMATEVIEWRECT, i, 6008 MAKELPARAM(cast(ushort)iw, cast(ushort)ih)); 6009 } 6010 6011 DWORD ListView_SetExtendedListViewStyle(HWND w, DWORD s) { 6012 return cast(DWORD) SendMessage(w, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, s); 6013 } 6014 6015 DWORD ListView_GetExtendedListViewStyle(HWND w) { 6016 return cast(DWORD) SendMessage(w, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); 6017 } 6018 6019 BOOL ListView_SetColumnOrderArray(HWND w, int i, int* a) { 6020 return cast(BOOL) SendMessage(w, LVM_SETCOLUMNORDERARRAY, 6021 cast(WPARAM) i, cast(LPARAM) a); 6022 } 6023 6024 BOOL ListView_GetColumnOrderArray(HWND w, int i, int* a) { 6025 return cast(BOOL) SendMessage(w, LVM_GETCOLUMNORDERARRAY, 6026 cast(WPARAM) i, cast(LPARAM) a); 6027 } 6028 6029 HWND ListView_GetHeader(HWND w) { 6030 return cast(HWND) SendMessage(w, LVM_GETHEADER, 0, 0); 6031 } 6032 6033 HCURSOR ListView_GetHotCursor(HWND w) { 6034 return cast(HCURSOR) SendMessage(w, LVM_GETHOTCURSOR, 0, 0); 6035 } 6036 6037 INT ListView_GetHotItem(HWND w) { 6038 return cast(INT) SendMessage(w, LVM_GETHOTITEM, 0, 0); 6039 } 6040 6041 BOOL ListView_GetSubItemRect(HWND w, int i, int isi, int c, LPRECT p) { 6042 if (p) 6043 { 6044 p.left = c; 6045 p.top = isi; 6046 } 6047 return cast(BOOL) SendMessage(w, LVM_GETSUBITEMRECT, i, cast(LPARAM) p); 6048 } 6049 6050 HCURSOR ListView_SetHotCursor(HWND w, HCURSOR c) { 6051 return cast(HCURSOR) SendMessage(w, LVM_SETHOTCURSOR, 0, 6052 cast(LPARAM) c); 6053 } 6054 6055 INT ListView_SetHotItem(HWND w, INT i) { 6056 return cast(INT) SendMessage(w, LVM_SETHOTITEM, cast(WPARAM) i, 0); 6057 } 6058 6059 DWORD ListView_SetIconSpacing(HWND w, int x, int y) { 6060 return cast(DWORD) SendMessage(w, LVM_SETICONSPACING, 0, 6061 MAKELONG(cast(ushort)x, cast(ushort)y)); 6062 } 6063 6064 INT ListView_SubItemHitTest(HWND w, LPLVHITTESTINFO p) { 6065 return cast(INT) SendMessage(w, LVM_SUBITEMHITTEST, 0, cast(LPARAM) p); 6066 } 6067 6068 BOOL ListView_SetItemCountEx(HWND w, int i, DWORD f) { 6069 return cast(BOOL) SendMessage(w, LVM_SETITEMCOUNT, i, cast(LPARAM) f); 6070 } 6071 6072 extern (Windows) { 6073 WINBOOL ImageList_SetImageCount(HIMAGELIST, UINT); 6074 WINBOOL ImageList_Copy(HIMAGELIST, int, HIMAGELIST, int, UINT); 6075 WINBOOL ImageList_DrawIndirect(IMAGELISTDRAWPARAMS*); 6076 } 6077 6078 int TabCtrl_SetMinTabWidth(HWND hwnd, int x) { 6079 return cast(int) SendMessage(hwnd, TCM_SETMINTABWIDTH, 0, x); 6080 } 6081 6082 VOID TabCtrl_DeselectAll(HWND hwnd, UINT fExcludeFocus) { 6083 SendMessage(hwnd, TCM_DESELECTALL, fExcludeFocus, 0); 6084 } 6085 6086 HWND TreeView_GetToolTips(HWND w) { 6087 return cast(HWND) SendMessage(w, TVM_GETTOOLTIPS, 0, 0); 6088 } 6089 6090 HWND TreeView_SetToolTips(HWND w, HWND wt) { 6091 return cast(HWND) SendMessage(w, TVM_SETTOOLTIPS, cast(WPARAM) wt, 0); 6092 } 6093 } 6094 6095 static if (_WIN32_IE >= 0x400) { 6096 BOOL ListView_GetBkImage(HWND h, LPLVBKIMAGE plvbki) { 6097 return cast(BOOL) SendMessage(h, LVM_GETBKIMAGE, 0, 6098 cast(LPARAM) plvbki); 6099 } 6100 6101 BOOL ListView_SetBkImage(HWND h, LPLVBKIMAGE plvbki) { 6102 return cast(BOOL) SendMessage(h, LVM_SETBKIMAGE, 0, 6103 cast(LPARAM) plvbki); 6104 } 6105 6106 DWORD ListView_SetExtendedListViewStyleEx(HWND w, DWORD m, DWORD s) { 6107 return cast(DWORD) SendMessage(w, LVM_SETEXTENDEDLISTVIEWSTYLE, m, s); 6108 } 6109 6110 VOID ListView_SetWorkAreas(HWND w, INT n, LPRECT r) { 6111 SendMessage(w, LVM_SETWORKAREAS, cast(WPARAM) n, cast(LPARAM) r); 6112 } 6113 6114 VOID ListView_GetWorkAreas(HWND w, INT n, LPRECT r) { 6115 SendMessage(w, LVM_GETWORKAREAS, cast(WPARAM) n, cast(LPARAM) r); 6116 } 6117 6118 BOOL ListView_GetNumberOfWorkAreas(HWND w, LPUINT n) { 6119 return cast(BOOL) SendMessage(w, LVM_GETNUMBEROFWORKAREAS, 0, 6120 cast(LPARAM) n); 6121 } 6122 6123 DWORD ListView_SetHoverTime(HWND w, DWORD t) { 6124 return cast(DWORD) SendMessage(w, LVM_SETHOVERTIME, 0, 6125 cast(LPARAM) t); 6126 } 6127 6128 DWORD ListView_GetHoverTime(HWND w) { 6129 return cast(DWORD) SendMessage(w, LVM_GETHOVERTIME, 0, 0); 6130 } 6131 6132 INT ListView_GetSelectionMark(HWND w) { 6133 return cast(INT) SendMessage(w, LVM_GETSELECTIONMARK, 0, 0); 6134 } 6135 6136 INT ListView_SetSelectionMark(HWND w, INT i) { 6137 return cast(INT) SendMessage(w, LVM_SETSELECTIONMARK, 0, cast(LPARAM) i); 6138 } 6139 6140 HWND ListView_SetToolTips(HWND w, HWND n) { 6141 return cast(HWND) SendMessage(w, LVM_SETTOOLTIPS, cast(WPARAM) n, 0); 6142 } 6143 6144 HWND ListView_GetToolTips(HWND w) { 6145 return cast(HWND) SendMessage(w, LVM_GETTOOLTIPS, 0, 0); 6146 } 6147 6148 BOOL ListView_SetUnicodeFormat(HWND w, BOOL f) { 6149 return cast(BOOL) SendMessage(w, LVM_SETUNICODEFORMAT, 6150 cast(WPARAM) f, 0); 6151 } 6152 6153 BOOL ListView_GetUnicodeFormat(HWND w) { 6154 return cast(BOOL) SendMessage(w, LVM_GETUNICODEFORMAT, 0, 0); 6155 } 6156 6157 BOOL TabCtrl_HighlightItem(HWND hwnd, INT i, WORD fHighlight) { 6158 return cast(BOOL) SendMessage(hwnd, TCM_HIGHLIGHTITEM, 6159 cast(WPARAM) i, cast(LPARAM) MAKELONG(fHighlight, 0)); 6160 } 6161 6162 DWORD TabCtrl_SetExtendedStyle(HWND hwnd, DWORD dw) { 6163 return cast(DWORD) SendMessage(hwnd, TCM_SETEXTENDEDSTYLE, 0, dw); 6164 } 6165 6166 DWORD TabCtrl_GetExtendedStyle(HWND hwnd) { 6167 return cast(DWORD) SendMessage(hwnd, TCM_GETEXTENDEDSTYLE, 0, 0); 6168 } 6169 6170 BOOL TabCtrl_SetUnicodeFormat(HWND hwnd, HWND fUnicode) { 6171 return cast(BOOL) SendMessage(hwnd, TCM_SETUNICODEFORMAT, 6172 cast(WPARAM) fUnicode, 0); 6173 } 6174 6175 BOOL TabCtrl_GetUnicodeFormat(HWND hwnd) { 6176 return cast(BOOL) SendMessage(hwnd, TCM_GETUNICODEFORMAT, 0, 0); 6177 } 6178 6179 COLORREF TreeView_GetBkColor(HWND w) { 6180 return cast(COLORREF) SendMessage(w, TVM_GETBKCOLOR, 0, 0); 6181 } 6182 6183 COLORREF TreeView_GetInsertMarkColor(HWND w) { 6184 return cast(COLORREF) SendMessage(w, TVM_GETINSERTMARKCOLOR, 0, 0); 6185 } 6186 6187 int TreeView_GetItemHeight(HWND w) { 6188 return cast(int) SendMessage(w, TVM_GETITEMHEIGHT, 0, 0); 6189 } 6190 6191 UINT TreeView_GetScrollTime(HWND w) { 6192 return cast(UINT) SendMessage(w, TVM_GETSCROLLTIME, 0, 0); 6193 } 6194 6195 COLORREF TreeView_GetTextColor(HWND w) { 6196 return cast(COLORREF) SendMessage(w, TVM_GETTEXTCOLOR, 0, 0); 6197 } 6198 6199 COLORREF TreeView_SetBkColor(HWND w, COLORREF c) { 6200 return cast(COLORREF) SendMessage(w, TVM_SETBKCOLOR, 0, 6201 cast(LPARAM) c); 6202 } 6203 6204 COLORREF TreeView_SetInsertMarkColor(HWND w, COLORREF c) { 6205 return cast(COLORREF) SendMessage(w, TVM_SETINSERTMARKCOLOR, 0, 6206 cast(LPARAM) c); 6207 } 6208 6209 int TreeView_SetItemHeight(HWND w, SHORT h) { 6210 return cast(int) SendMessage(w, TVM_SETITEMHEIGHT, cast(WPARAM) h, 0); 6211 } 6212 6213 UINT TreeView_SetScrollTime(HWND w, UINT t) { 6214 return cast(UINT) SendMessage(w, TVM_SETSCROLLTIME, cast(WPARAM) t, 0); 6215 } 6216 6217 COLORREF TreeView_SetTextColor(HWND w, COLORREF c) { 6218 return cast(COLORREF) SendMessage(w, TVM_SETTEXTCOLOR, 0, 6219 cast(LPARAM) c); 6220 } 6221 6222 BOOL TreeView_SetInsertMark(HWND w, HTREEITEM i, BOOL a) { 6223 return cast(BOOL) SendMessage(w, TVM_SETINSERTMARK, cast(WPARAM) a, 6224 cast(LPARAM) i); 6225 } 6226 6227 BOOL TreeView_SetUnicodeFormat(HWND w, BOOL u) { 6228 return cast(BOOL) SendMessage(w, TVM_SETUNICODEFORMAT, 6229 cast(WPARAM) u, 0); 6230 } 6231 6232 BOOL TreeView_GetUnicodeFormat(HWND w) { 6233 return cast(BOOL) SendMessage(w, TVM_GETUNICODEFORMAT, 0, 0); 6234 } 6235 6236 HTREEITEM TreeView_GetLastVisible(HWND w) { 6237 return TreeView_GetNextItem(w, null, TVGN_LASTVISIBLE); 6238 } 6239 } 6240 6241 static if (_WIN32_IE >= 0x500) { 6242 UINT TreeView_GetItemState(HWND w, HTREEITEM i, UINT m) { 6243 return cast(UINT) SendMessage(w, TVM_GETITEMSTATE, cast(WPARAM) i, 6244 cast(LPARAM) m); 6245 } 6246 6247 BOOL TreeView_SetItemState(HWND w, HTREEITEM i, UINT d, UINT m) { 6248 TVITEM _tvi; 6249 _tvi.mask = TVIF_STATE; 6250 _tvi.hItem = i; 6251 _tvi.stateMask = m; 6252 _tvi.state = d; 6253 return cast(BOOL) SendMessage(w, TVM_SETITEM, 0, cast(LPARAM) &_tvi); 6254 } 6255 } 6256 6257 6258 //#ifdef _WIN32_WCE // these are PPC only 6259 /+ 6260 extern (Windows) { 6261 HWND CommandBar_Create(HINSTANCE, HWND, int); 6262 BOOL CommandBar_Show(HWND, BOOL); 6263 int CommandBar_AddBitmap(HWND, HINSTANCE, int, int, int, int); 6264 HWND CommandBar_InsertComboBox(HWND, HINSTANCE, int, UINT, WORD, WORD); 6265 BOOL CommandBar_InsertMenubar(HWND, HINSTANCE, WORD, WORD ); 6266 BOOL CommandBar_InsertMenubarEx(HWND, HINSTANCE, LPTSTR, WORD); 6267 BOOL CommandBar_DrawMenuBar(HWND, WORD); 6268 HMENU CommandBar_GetMenu(HWND, WORD); 6269 BOOL CommandBar_AddAdornments(HWND, DWORD, DWORD); 6270 int CommandBar_Height(HWND hwndCB); 6271 } 6272 6273 // MinGW: These two are not in the DLL 6274 void CommandBar_InsertButton(HWND hwnd, int i, LPTBBUTTON lptbbutton) { 6275 SendMessage(hwnd, TB_INSERTBUTTON, i, lptbbutton); 6276 } 6277 alias DestroyWindow CommandBar_Destroy; 6278 +/ 6279 //#endif // _WIN32_WCE 6280 6281 6282 static if (_WIN32_WINNT >= 0x501) { 6283 struct EDITBALLOONTIP 6284 { 6285 DWORD cbStruct; 6286 LPCWSTR pszTitle; 6287 LPCWSTR pszText; 6288 INT ttiIcon; 6289 } 6290 alias EDITBALLOONTIP* PEDITBALLOONTIP; 6291 6292 enum EM_SETCUEBANNER = ECM_FIRST + 1; 6293 enum EM_GETCUEBANNER = ECM_FIRST + 2; 6294 enum EM_SHOWBALLOONTIP = ECM_FIRST + 3; 6295 enum EM_HIDEBALLOONTIP = ECM_FIRST + 4; 6296 } 6297 6298 static if (_WIN32_WINNT >= 0x600) { 6299 enum EM_SETHILITE = ECM_FIRST + 5; 6300 enum EM_GETHILITE = ECM_FIRST + 6; 6301 }