The framework calls this member function when the Clipboard contains a data handle for the CF_OWNERDISPLAY format (that is, when the Clipboard owner will display the Clipboard contents).

afx_msg void OnAskCbFormatName(
   UINT nMaxCount,
   LPTSTR lpszString 


  • nMaxCount
    Specifies the maximum number of bytes to copy.

  • lpszString
    Points to the buffer where the copy of the format name is to be stored.


The Clipboard owner should provide a name for its format.

Override this member function and copy the name of the CF_OWNERDISPLAY format into the specified buffer, not exceeding the maximum number of bytes specified.


This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.


Header: afxwin.h

See Also


CWnd Class

Hierarchy Chart



CWnd Members