WM_NOTIFYFORMAT  11OPN1X 

Common controls, custom controls, and their parent windows use the WM_NOTIFYFORMAT message to determine whether the control should use ANSI or Unicode structures in the WM_NOTIFY1MZT7BR notification messages that the control uses to communicate with its parent window. WM_NOTIFYFORMAT messages are sent from a control to its parent window, and from the parent window to the control.

hwndFrom = (HWND) wParam;        // handle of the window sending this message

Command =  lParam;               // command value specifying the nature of this message

 

Parameters

hwndFrom

Value of wParam. Handle of the window that is sending the WM_NOTIFYFORMAT message. If Command is NF_QUERY, hwndFrom is the handle of a control. If Command is NF_REQUERY, this is the handle of the parent window of a control.

Command

Value of lParam. A command value that specifies the nature of the WM_NOTIFYFORMAT message. The following values are defined:

Value

Meaning

NF_QUERY

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

NF_REQUERY

The message is a request that a control send an NF_QUERY form of this message to its parent window. This command is sent from a control s parent window to the control. The parent window is asking the control to requery it about the type of structures to use in WM_NOTIFY messages.

 

Return Values

The return value is one of the following :

Value

Meaning

NFR_ANSI

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

NFR_UNICODE

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

0

An error occurred.

 

If Command is NF_REQUERY, the return value is the result of the requery operation.

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_NOTIFY1MZT7BR messages. If the parent window does not handle this message, the DefWindowProc32D1NBH 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.

See Also

DefDlgProc, DefWindowProc, WM_NOTIFY