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_NOTIFY 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
Value |
Meaning |
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. 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. |
The return value is one of the following :
Value |
Meaning |
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. |
If Command is NF_REQUERY, the return value is the result of the requery operation.
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.
DefDlgProc, DefWindowProc, WM_NOTIFY
file: /Techref/os/win/api/win32/mess/src/msg26_20.htm, 4KB, , updated: 2000/4/7 11:20, local time: 2024/11/10 02:51,
3.145.111.115:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://linistepper.com/Techref/os/win/api/win32/mess/src/msg26_20.htm"> WM_NOTIFYFORMAT</A> |
Did you find what you needed? |