WM_NOTIFYFORMATWM_NOTIFYFORMAT*
*



Contents  *



Index  *Topic Contents
*Previous Topic: WM_NOTIFY
*Next Topic: Common Control Utility Macros

WM_NOTIFYFORMAT


WM_NOTIFYFORMAT
    hwndFrom = (HWND) wParam; 
    Command = lParam; 

Used to determine 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.

hwndFrom
Handle to the window that is sending the WM_NOTIFYFORMAT message. If Command is NF_QUERY, this parameter is the handle to a control. If Command is NF_REQUERY, this parameter is the handle to the parent window of a control.
Command
Command value that specifies the nature of the WM_NOTIFYFORMAT message. This will be one of the following values:
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.

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.

Not all controls will send WM_NOTIFYFORMAT messages. In particular, the standard Windows controls (edit controls, combo boxes, list boxes, buttons, scroll bars, and static controls) do not send WM_NOTIFYFORMAT messages. Consult the documentation for the control to determine if it will send the WM_NOTIFYFORMAT message.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.