65.9K
CodeProject is changing. Read more.
Home

An MS Outlook-style mini-calendar control using WTL

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.79/5 (19 votes)

May 22, 2003

1 min read

viewsIcon

117392

downloadIcon

3059

An MS Outlook-style mini-calendar control using WTL

Sample Image

Introduction

This article explains an MS Outlook-style mini-calendar control using WTL.

This began as a port of Matt Gullett's MS Outlook-style miniature calendar control written for MFC. There are still some features remaining to be added to it, but it serves as a reasonable starting point for anyone needing this functionality in a WTL application.

Features

  • Display months in n-columns by m-rows
  • Single-date or date-range selection (including SHIFT-extended selection)
  • Different fonts for: header, day initials, and day numbers
  • Auto-repeat on scroll arrows
  • Auto-scroll when previous/following months' days are selected
  • Callback (via WM_NOTIFY) for highlighting 'special days'
  • Month-year selection from header popup (with drop shadow under XP)

Optional display styles include:

  • 3D border
  • Today's date highlighted
  • Previous/following months' days displayed with the months' days
  • Week can start on any day of the week

Environment

This control was developed using VC++ .NET, WTL 7, and the Feb 2003 Platform SDK. It has been tested under Windows XP only.

History

  • 22 May 2003
    • Initial release
  • 6 June 2003
    • Added month/year selection popup
    • Added 'special date' highlighting
  • Soon...?
    • Buttons (optional) for selecting today's date, and for clearing the selection
    • Provide internationalisation support
    • Make it an ActiveX component

Acknowledgements