Sunday 11 July 2004

Changes to Win32 API in Longhorn - Common Controls

The Common Controls API is largely implemented in commctrl.h. Let's see what's new (note, of course, everything is subject to change; documentation for these functions and flags isn't yet written).

  • New Histogram control: ICC_HISTOGRAM_CLASS flag for InitCommonControlsEx, many structures, messages, notifications, flags etc
  • Notification message on font change: NM_FONTCHANGED
  • New custom draw flags CDRF_DOERASE, CDRF_SKIPPOSTPAINT (marked internal)
  • New message NM_GETCUSTOMSPLITRECT and accompanying structure
  • New flag ILC_ORIGINALSIZE for ImageList_Create
  • New flag ILD_ASYNC for ImageList_Draw
  • New flags ILS_EMBOSS, ILS_REFLECT, ILS_INVERT for ImageList_DrawIndirect
  • Reference to SparseImageList (value HBITMAP_CALLBACK - enables image to be supplied on demand, dynamic images in ListViews?)
  • Checkboxes and non-resizable columns in Header controls (HDS_CHECKBOXES, HDS_NOSIZING)
  • Data filtering by date (HDFT_ISDATE used with HDITEM structure)
  • Hit testing header-items can report On Item State Icon (HHT_ONITEMSTATEICON)
  • Header state icons: new macros Header_GetStateImageList and Header_SetStateImageList
  • Ability to use accelerator keys with a header control (?): HDM_TRANSLATEACCELERATOR
  • Item notifications: HDN_BEGINFILTEREDIT, HDN_ENDFILTEREDIT, HDN_ITEMSTATEICONCLICK, HDN_ITEMKEYDOWN
  • Oddly extended toolbar class: "ToolbarWindow32_Mil"
  • Callback image labels in a toolbar: TBSTYLE_EX_CALLBACKIMAGELABELS
  • "Use CustomDrawColors to RenderText regardless of VisualStyle": TBCDRF_USECDCOLORS for toolbar custom draw
  • Transparent, splitter rebars: RBS_EX_TRANSPARENT, RBS_EX_SPLITTER
  • Notification of rebar splitter drag: RBN_SPLITTERDRAG
  • Tooltip can have a preview bitmap: new member hbmp on TOOLINFO structure
  • 'Themed' hyperlinks in tooltips: TTS_USEVISUALSTYLE style flag
  • Animated progress bars (?): PBM_ANIMATE, PBM_TRANSITIONTOPOS messages
  • New List View style flags LVSIL_GROUPHEADER, LVSIL_IMAGETITLE (draw your own conclusions - groups of items in a list view?)
  • List View item flags LVIF_IMAGETITLE, LVIF_TASKS, LVIF_COLFMT, structure LVTASKS and corresponding fields in LVITEM
  • New list view item search flags for LVM_GETNEXTITEM message: LVNI_VISIBLEORDER, LVNI_PREVIOUS, LVNI_VISIBLEONLY, LVNI_SAMEGROUPONLY
  • New flag for LVM_GETITEMRECT: LVIR_NUMORDER
  • Hit test flags for ListView groups: group header, footer, expand/collapse button, background, state icon, contents.
  • New macro ListView_HitTestEx to support group flags
  • Additional flags for controlling ListView column formats
  • ListView extended styles: Justify Columns, Transparent Background, Transparent Shadow Text, Show Numeric Order, Auto Auto Arrange (Icons automatically arrange if no icon positions have been set), Show Header in all modes, Auto Check Select (?), Auto Size Columns
  • Alpha-blend background images: LVBKIF_ALPHABLEND
  • New ListView views: Carousel, Panorama
  • New options for ListView groups (different from above groups? LVGROUP structure extended) and new styles
  • ListView Tile View 'extended' size flag: LVTVIF_EXTENDED
  • Column formats for tile info columns
  • Bitmaps on ListView infotips
  • Is a list item visible? ListView_IsItemVisible macro
  • NMLVLINK structure: links in a ListView? Also LVN_LINKCLICK notification
  • LVN_ORDERCHANGED notification
  • Async drawing of ListViews
  • Enhancements to Animation control: ACM_OPENXFILE, ACM_SETTEXTURE messages
  • Split buttons: a host of new messages, styles, flags, structures and notifications. I assume this is like the Open button in VS2003.
  • Edit control: Set Highlight, Get Highlight messages
  • Unknown flags: DCHF_TOPALIGN, DCHF_HORIZONTAL, DCHF_HOT, DCHF_PUSHED, DCHF_FLIPPED, DCHF_TRANSPARENT, DCHF_INACTIVE, DCHF_NOBORDER. Might be related to:
  • DrawScrollArrow API

Of course, it's possible that a lot of this is to support the sample UI in current Longhorn builds, and might disappear before the final software is released. Heck, it could disappear before the next build is released.

No comments: