Customizing Output with Callback Fields

In addition to the standard format characters that define date and time picker fields, you can customize your output by specifying certain parts of a format string as callback fields. To declare a callback field, include one or more ASCII Code 88 "X" characters anywhere in the body of the format string. Like other date and time picker control fields, callback fields are displayed in left-to-right order, based on their location in the format string.

You can create unique callback fields by repeating the "X" character. Thus, the following format string contains two callback fields: 'XXddddMMMdd', 'yyyXXX'. Remember, because callback fields are treated as valid fields, your application must be prepared to handle DTN_WMKEYDOWN notification messages.

When the date and time picker control parses the format string and encounters a callback field, it sends DTN_FORMAT and DTN_FORMATQUERY notification messages. The owner of the control must respond to these notifications to ensure that the custom information is properly displayed.