Export (0) Print
Expand All

WM_NOTIFYFORMAT message

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.

Parameters

wParam

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.

lParam

The command value that specifies the nature of the WM_NOTIFYFORMAT message. This will be one of the following values:

ValueMeaning
NF_QUERY

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.

NF_REQUERY

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.

 

Return value

Returns one of the following values.

Return codeDescription
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

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft