NMDATETIMEFORMATA structure (commctrl.h)

Contains information about a portion of the format string that defines a callback field within a date and time picker (DTP) control. It carries the substring that defines the callback field and contains a buffer to receive the string that will be displayed in the callback field. This structure is used with the DTN_FORMAT notification code.

Syntax

typedef struct tagNMDATETIMEFORMATA {
  NMHDR      nmhdr;
  LPCSTR     pszFormat;
  SYSTEMTIME st;
  LPCSTR     pszDisplay;
  CHAR       szDisplay[64];
} NMDATETIMEFORMATA, *LPNMDATETIMEFORMATA;

Members

nmhdr

Type: NMHDR

An NMHDR structure that contains information about the notification code.

pszFormat

Type: LPCTSTR

A pointer to the substring that defines a DTP control callback field. The substring consists of one or more "X" characters followed by a NULL character. (For more information about callback fields, see Callback fields.)

st

Type: SYSTEMTIME

A SYSTEMTIME structure that contains the date and time to be formatted.

pszDisplay

Type: LPCTSTR

A pointer to a null-terminated string that contains the display text of the control. By default, this is the address of the szDisplay member of this structure. It is acceptable to have pszDisplay point to an existing string. In this case, you do not need to assign a value to szDisplay. However, the string that pszDisplay points to must remain valid until another DTN_FORMAT notification is sent, or until the control is destroyed.

szDisplay[64]

Type: TCHAR

64-character buffer that is to receive the zero-terminated string that the DTP control will display. It is not necessary to fill the entire buffer.

Remarks

Note

The commctrl.h header defines NMDATETIMEFORMAT as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header commctrl.h