Jump to content

WM QUERYWINDOWPARAMS: Difference between revisions

From EDM2
Created page with "This message occurs when an application queries the window parameters. ;in Button Controls Occurs when an application queries the button control window procedure window parameters. ;in Entry Fields This message occurs when an application queries the entry field control window parameters. ==Syntax== <pre> param1 PWNDPARAMS pwndparams; Window parameter structure.: param2 ULONG ulReserved; Reserved value, should be 0.: </pre> ===in Circular Sl..."
 
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
This message occurs when an application queries the entry field control window parameters.  
This message occurs when an application queries the entry field control window parameters.  


;in Frame Controls
This message occurs when an application queries the frame control window parameters.
;in List Boxes
Occurs when an application queries the list box control window parameters.
;in Menu Controls
Occurs when an application queries the menu control window procedure parameters.
;in Multiline Entry Fields
This message occurs when an application queries the entry field control window parameters.
;in Scroll Bars
This message occurs when an application queries the scroll bar control window parameters.
;in Static Controls
This message occurs when an application queries the static control window procedure window parameters.
;in Title Bars
This message occurs when an application queries the title bar control window procedure window parameters.


==Syntax==
==Syntax==
Line 21: Line 41:
param1
param1
     PWNDPARAMS  pwndparams  /*  Pointer to a WNDPARAMS window parameter structure. */
     PWNDPARAMS  pwndparams  /*  Pointer to a WNDPARAMS window parameter structure. */
param2
    ULONG      ulReserved  /*  Reserved value, should be 0. */
</pre>
===in Slider Controls===
<pre>
param1
    PWNDPARAMS  pwndparams  /*  Pointer to a WNDPARAMS window parameter structure. */
param2
    ULONG      ulReserved  /*  Reserved value, should be 0. */
</pre>
===in Value Set Controls===
<pre>
param1
    PWNDPARAMS  wndparams  /*  Pointer to a WNDPARAMS window parameter structure. */


param2
param2
Line 27: Line 65:


==Parameters==
==Parameters==
;''pwndparams'' ([[PWNDPARAMS]]) - input/output: This points to a [[WNDPARAMS]] structure. The valid values of ''fsStatus'' are WPM_CCHTEXT, WPM_TEXT, WPM_CBCTLDATA, and WPM_CTLDATA. The flags in ''fsStatus'' are cleared as each item is processed. If the call is successful, ''fsStatus'' is 0. If any item has not been processed, the flag for that item is still set.
;''pwndparams'' (P[[WNDPARAMS]]) - input/output: This points to a [[WNDPARAMS]] structure. The valid values of ''fsStatus'' are WPM_CCHTEXT, WPM_TEXT, WPM_CBCTLDATA, and WPM_CTLDATA. The flags in ''fsStatus'' are cleared as each item is processed. If the call is successful, ''fsStatus'' is 0. If any item has not been processed, the flag for that item is still set.
;''ulReserved'' (ULONG) - input: Reserved value, should be 0.
;''ulReserved'' (ULONG) - input: Reserved value, should be 0.
===in Slider Controls===
;''pwndparams'' (P[[WNDPARAMS]]) - input/output: Pointer to a [[WNDPARAMS]] window parameter structure. This structure contains:
:::;''status'' ([[USHORT]]) - Window parameter selection. Identifies the window parameters that are to be set or queried. Valid values for the slider control are:
::::WPM_CBCTLDATA: Window control data length.
::::WPM_CTLDATA: Window control data.
::::The flags in the status field are cleared as each item is processed. If the call is successful, the status field is 0. If any item has not been processed, the flag for that item is still set.
:::;''length'' ([[USHORT]]) - Length of the window text.
:::;''text'' (PSZ) - Window text.
:::;''presparamslength'' ([[USHORT]]) - Length of presentation parameters.
:::;''presparams'' (PVOID) - Presentation parameters.
:::;''ctldatalength'' ([[USHORT]]) - Length of window class-specific data.
:::;''ctldata'' (PVOID) - Window class-specific data.
;''ulReserved'' (ULONG) - Reserved value, should be 0.


===in Circular Slider Controls===
===in Circular Slider Controls===
;''pwndparams'' ([[PWNDPARAMS]]) - input/output: Pointer to a [[WNDPARAMS]] window parameter structure. This structure contains:
;''pwndparams'' (P[[WNDPARAMS]]) - input/output: Pointer to a [[WNDPARAMS]] window parameter structure. This structure contains:
:::;''status'' (ULONG) - Window parameter selection. Identifies the window parameters that are to be queried. Valid values for the slider control are:
:::;''status'' (ULONG) - Window parameter selection. Identifies the window parameters that are to be queried. Valid values for the slider control are:
::::WPM_TEXT: Window text.
::::WPM_TEXT: Window text.
Line 42: Line 94:
:::;''ctldatalength'' (ULONG) - Length of window class-specific data.
:::;''ctldatalength'' (ULONG) - Length of window class-specific data.
:::;''ctldata'' (PVOID) - Window class-specific data.
:::;''ctldata'' (PVOID) - Window class-specific data.
:::;''ulReserved'' (ULONG) - Reserved value, should be 0.
;''ulReserved'' (ULONG) - Reserved value, should be 0.


===in Value Set Controls===
;''wndparams'' (P[[WNDPARAMS]]) - input/output: Pointer to a [[WNDPARAMS]] window parameter structure. For a value set, the valid values for the ''fsStatus'' field are WPM_CBCTLDATA and WPM_CTLDATA. The flags in the ''fsStatus'' field are cleared as each item is processed. If the call is successful, the ''fsStatus'' field is NULL. If any item has not been processed, the flag for that item is still set.
;''ulReserved'' (ULONG) - Reserved value, should be 0.


==Returns==
==Returns==
Line 49: Line 104:
:TRUE: Successful completion
:TRUE: Successful completion
:FALSE: Error occurred
:FALSE: Error occurred


==Remarks==
==Remarks==
Line 64: Line 117:
The entry field control window procedure responds to this message by returning the window parameters indicated by the fsStatus parameter of the WNDPARAMS data structure identified by the pwndparams parameter.  
The entry field control window procedure responds to this message by returning the window parameters indicated by the fsStatus parameter of the WNDPARAMS data structure identified by the pwndparams parameter.  


===in List Boxes===
The list box control window procedure responds to this message by passing it to the default window procedure.
===in Menu Controls===
The menu control window procedure responds to this message by passing it to the default window procedure.
===in Multiline Entry Fields===
The multi-line entry field control window procedure responds to this message by returning the window parameters indicated by the fsStatus parameter of the WNDPARAMS data structure, identified by the pwndparams parameter.
In response to the WPM_CCHTEXT flag, the text length is reported in the CF_TEXT format. If it exceeds 64KB-1, then this value is reported. In response to the WPM_TEXT flag, text up to the amount returned for the WPM_CCHTEXT value is placed at the indicated location in CF_TEXT format.
===in Scroll Bars===
The scroll bar control window procedure responds to this message by returning the window parameters indicated by the fsStatus parameter of the WNDPARAMS data structure identified by the pwndparams parameter.
===in Slider Controls===
The slider control window procedure responds to this message by returning the information in the buffer provided. If this message is sent to a slider window of another process, the information in, or identified by, the value of the pwndparams field must be in memory shared by both processes.
===in Static Controls===
The static control window procedure responds to this message by passing it to the default window procedure.
===in Value Set Controls===
The value set control window procedure responds to this message by returning the information in the buffer provided. If this message is sent to a value set window of another process, the information in, or identified by, the wndparams parameter must be in memory shared by both processes.


==Default Processing==
==Default Processing==
The default window procedure sets the ''cchText'', ''cbPresParams'', and ''cbCtlData'' parameters of the [[WNDPARAMS]] data structure identified by the ''pwndparams'' to 0, and sets ''rc'' to FALSE.
The default window procedure sets the ''cchText'', ''cbPresParams'', and ''cbCtlData'' parameters of the [[WNDPARAMS]] data structure identified by the ''pwndparams'' to 0, and sets ''rc'' to FALSE.


===in Title Bars===
The title bar control window procedure queries the appropriate window parameters in accordance with ''pwndparams'' and sets ''rc'' to TRUE if the operation is successful, otherwise to FALSE.
===in Frame Controls===
The frame control window procedure queries the appropriate window parameters in accordance with pwndparams and sets rc to TRUE if the operation is successful, otherwise to FALSE.


The window text of a frame control is obtained by sending this message to its FID_TITLEBAR.


==Related Messages==
==Related Messages==

Latest revision as of 03:57, 19 April 2025

This message occurs when an application queries the window parameters.

in Button Controls

Occurs when an application queries the button control window procedure window parameters.

in Entry Fields

This message occurs when an application queries the entry field control window parameters.

in Frame Controls

This message occurs when an application queries the frame control window parameters.

in List Boxes

Occurs when an application queries the list box control window parameters.

in Menu Controls

Occurs when an application queries the menu control window procedure parameters.

in Multiline Entry Fields

This message occurs when an application queries the entry field control window parameters.

in Scroll Bars

This message occurs when an application queries the scroll bar control window parameters.

in Static Controls

This message occurs when an application queries the static control window procedure window parameters.

in Title Bars

This message occurs when an application queries the title bar control window procedure window parameters.

Syntax

param1
    PWNDPARAMS pwndparams; /* Window parameter structure. */

param2
    ULONG      ulReserved; /* Reserved value, should be 0. */

in Circular Slider Controls

param1
     PWNDPARAMS  pwndparams  /*  Pointer to a WNDPARAMS window parameter structure. */

param2
     ULONG       ulReserved  /*  Reserved value, should be 0. */

in Slider Controls

param1
     PWNDPARAMS  pwndparams  /*  Pointer to a WNDPARAMS window parameter structure. */

param2
     ULONG       ulReserved  /*  Reserved value, should be 0. */

in Value Set Controls

param1
     PWNDPARAMS  wndparams   /*  Pointer to a WNDPARAMS window parameter structure. */

param2
     ULONG       ulReserved  /*  Reserved value, should be 0. */

Parameters

pwndparams (PWNDPARAMS) - input/output
This points to a WNDPARAMS structure. The valid values of fsStatus are WPM_CCHTEXT, WPM_TEXT, WPM_CBCTLDATA, and WPM_CTLDATA. The flags in fsStatus are cleared as each item is processed. If the call is successful, fsStatus is 0. If any item has not been processed, the flag for that item is still set.
ulReserved (ULONG) - input
Reserved value, should be 0.

in Slider Controls

pwndparams (PWNDPARAMS) - input/output
Pointer to a WNDPARAMS window parameter structure. This structure contains:
status (USHORT) - Window parameter selection. Identifies the window parameters that are to be set or queried. Valid values for the slider control are
WPM_CBCTLDATA: Window control data length.
WPM_CTLDATA: Window control data.
The flags in the status field are cleared as each item is processed. If the call is successful, the status field is 0. If any item has not been processed, the flag for that item is still set.
length (USHORT) - Length of the window text.
text (PSZ) - Window text.
presparamslength (USHORT) - Length of presentation parameters.
presparams (PVOID) - Presentation parameters.
ctldatalength (USHORT) - Length of window class-specific data.
ctldata (PVOID) - Window class-specific data.
ulReserved (ULONG) - Reserved value, should be 0.

in Circular Slider Controls

pwndparams (PWNDPARAMS) - input/output
Pointer to a WNDPARAMS window parameter structure. This structure contains:
status (ULONG) - Window parameter selection. Identifies the window parameters that are to be queried. Valid values for the slider control are
WPM_TEXT: Window text.
WPM_CCHTEXT: Window text length.
The flags in the status field are unchanged by this processing.
length (ULONG) - Length of the window text.
text (PSZ) - Window text.
presparamslength (ULONG) - Length of presentation parameters.
presparams (PVOID) - Presentation parameters.
ctldatalength (ULONG) - Length of window class-specific data.
ctldata (PVOID) - Window class-specific data.
ulReserved (ULONG) - Reserved value, should be 0.

in Value Set Controls

wndparams (PWNDPARAMS) - input/output
Pointer to a WNDPARAMS window parameter structure. For a value set, the valid values for the fsStatus field are WPM_CBCTLDATA and WPM_CTLDATA. The flags in the fsStatus field are cleared as each item is processed. If the call is successful, the fsStatus field is NULL. If any item has not been processed, the flag for that item is still set.
ulReserved (ULONG) - Reserved value, should be 0.

Returns

rc (BOOL) - returns
Success indicator.
TRUE: Successful completion
FALSE: Error occurred

Remarks

If this message is sent to a window of another process, the information in, or identified by, pwndparams must be in memory shared by both processes.

in Button Controls

The button control window procedure responds to this message by passing it to the default window procedure.

in Circular Slider Controls

The slider control window procedure responds to this message by returning the information in the buffer provided. If this message is sent to a slider window of another process, the information in, or identified by, the value of the pwndparams field must be in memory shared by both processes.

in Entry Fields

The entry field control window procedure responds to this message by returning the window parameters indicated by the fsStatus parameter of the WNDPARAMS data structure identified by the pwndparams parameter.

in List Boxes

The list box control window procedure responds to this message by passing it to the default window procedure.

in Menu Controls

The menu control window procedure responds to this message by passing it to the default window procedure.

in Multiline Entry Fields

The multi-line entry field control window procedure responds to this message by returning the window parameters indicated by the fsStatus parameter of the WNDPARAMS data structure, identified by the pwndparams parameter.

In response to the WPM_CCHTEXT flag, the text length is reported in the CF_TEXT format. If it exceeds 64KB-1, then this value is reported. In response to the WPM_TEXT flag, text up to the amount returned for the WPM_CCHTEXT value is placed at the indicated location in CF_TEXT format.

in Scroll Bars

The scroll bar control window procedure responds to this message by returning the window parameters indicated by the fsStatus parameter of the WNDPARAMS data structure identified by the pwndparams parameter.

in Slider Controls

The slider control window procedure responds to this message by returning the information in the buffer provided. If this message is sent to a slider window of another process, the information in, or identified by, the value of the pwndparams field must be in memory shared by both processes.

in Static Controls

The static control window procedure responds to this message by passing it to the default window procedure.

in Value Set Controls

The value set control window procedure responds to this message by returning the information in the buffer provided. If this message is sent to a value set window of another process, the information in, or identified by, the wndparams parameter must be in memory shared by both processes.

Default Processing

The default window procedure sets the cchText, cbPresParams, and cbCtlData parameters of the WNDPARAMS data structure identified by the pwndparams to 0, and sets rc to FALSE.

in Title Bars

The title bar control window procedure queries the appropriate window parameters in accordance with pwndparams and sets rc to TRUE if the operation is successful, otherwise to FALSE.

in Frame Controls

The frame control window procedure queries the appropriate window parameters in accordance with pwndparams and sets rc to TRUE if the operation is successful, otherwise to FALSE.

The window text of a frame control is obtained by sending this message to its FID_TITLEBAR.

Related Messages

  • WM_QUERYWINDOWPARAMS (in Button Controls)
  • WM_QUERYWINDOWPARAMS (in Entry Fields)
  • WM_QUERYWINDOWPARAMS (in Frame Controls)
  • WM_QUERYWINDOWPARAMS (in List Boxes)
  • WM_QUERYWINDOWPARAMS (in Menu Controls)
  • WM_QUERYWINDOWPARAMS (in Multiline Entry Fields)
  • WM_QUERYWINDOWPARAMS (in Scroll Bars)
  • WM_QUERYWINDOWPARAMS (in Static Controls)
  • WM_QUERYWINDOWPARAMS (in Title Bars)