Share via


CWnd::OnNotifyFormat

The framework calls this member function to determine if the current window accepts ANSI or Unicode structures in the WM_NOTIFY notification message.

afx_msg UINT OnNotifyFormat(
    CWnd* pWnd, 
    UINT nCommand
);

Parameters

Parameter

Description

[in] pWnd

A pointer to a CWnd object that represents the window sending the WM_NOTIFY message.

This parameter is the pointer to a control if the nCommand parameter is NF_QUERY, or the pointer to the parent window of a control if nCommand is NF_REQUERY.

[in] nCommand

A command value that specializes the WM_NOTIFY message. The possible values are:

  • NF_QUERY -

    The message is a query to determine whether ANSI or Unicode structures should be used in WM_NOTIFY messages. This message is sent from a control to its parent window during the creation of a control, and in response to the NF_REQUERY form of this message.

  • NF_REQUERY -

    The message is a request for a control to send the NF_QUERY form of this message to its parent window. This request is sent from the parent window, and asks the control to requery the parent about the type of structure to use in WM_NOTIFY messages. If the nCommand parameter is NF_REQUERY, the return value is the result of the requery operation.

Return Value

Return value

Meaning

NFR_ANSI

ANSI structures should be used in WM_NOTIFY messages sent by the control.

NFR_UNICODE

Unicode structures should be used in WM_NOTIFY messages sent by the control.

0

An error occurred.

Remarks

This method receives the WM_NOTIFYFORMAT notification, which is described in the Windows SDK. WM_NOTIFY messages are sent from a common control to its parent window, and from the parent window to the common control.

Note

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.

Requirements

Header: afxwin.h

This method is supported in Windows Vista and later.

Additional requirements for this method are described in Build Requirements for Windows Vista Common Controls.

See Also

Reference

CWnd Class

Hierarchy Chart

WM_NOTIFYFORMAT

WM_NOTIFY