windows_programming_notes.nbk: Home | Index | Next Page: WM_NULL | Previous Page: WM_NOTIFY


 WM_NOTIFYFORMAT

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.

Syntax

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

Parameters

Return Values

Returns one of the following:

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_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

  Windows NT/2000: Requires Windows NT 3.51 or later 
  Windows 95/98/Me: Requires Windows 95 or later 
  Header: Declared in winuser.h.

windows_programming_notes.nbk: Home | Index | Next Page: WM_NULL | Previous Page: WM_NOTIFY


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time