Determines if a window accepts ANSI or Unicode structures in the WM_NOTIFY notification message. WM_NOTIFYFORMAT messages are sent from a common control to its parent window and from the parent window to the common control.
A handle to the window that is sending the WM_NOTIFYFORMAT message. If lParam is NF_QUERY, this parameter is the handle to a control. If lParam is NF_REQUERY, this parameter is the handle to the parent window of a control.
The command value that specifies the nature of the WM_NOTIFYFORMAT message. This will be one of the following values:
The message is a query to determine whether ANSI or Unicode structures should be used in WM_NOTIFY messages. This command is sent from a control to its parent window during the creation of a control and in response to an NF_REQUERY command.
The message is a request for a control to send an NF_QUERY form of this message to its parent window. This command is sent from the parent window. The parent window is asking the control to requery it about the type of structures to use in WM_NOTIFY messages. If lParam is NF_REQUERY, the return value is the result of the requery operation.
Returns one of the following values.
||ANSI structures should be used in WM_NOTIFY messages sent by the control.
||Unicode structures should be used in WM_NOTIFY messages sent by the control.
||An error occurred.
When a common control is created, the control sends a WM_NOTIFYFORMAT message to its parent window to determine the type of structures to use in WM_NOTIFY messages. If the parent window does not handle this message, the DefWindowProc function responds according to the type of the parent window. That is, if the parent window is a Unicode window, DefWindowProc returns NFR_UNICODE, and if the parent window is an ANSI window, DefWindowProc returns NFR_ANSI. If the parent window is a dialog box and does not handle this message, the DefDlgProc function similarly responds according to the type of the dialog box (Unicode or ANSI).
A parent window can change the type of structures a common control uses in WM_NOTIFY messages by setting lParam to NF_REQUERY and sending a WM_NOTIFYFORMAT message to the control. This causes the control to send an NF_QUERY form of the WM_NOTIFYFORMAT message to the parent window.
All common controls will send WM_NOTIFYFORMAT messages. However, the standard Windows controls (edit controls, combo boxes, list boxes, buttons, scroll bars, and static controls) do not.
|Minimum supported client
||Windows Vista [desktop apps only]
|Minimum supported server
||Windows Server 2003 [desktop apps only]