Skip to content

Latest commit

 

History

History
141 lines (99 loc) · 4.74 KB

ns-winuser-helpwininfoa.md

File metadata and controls

141 lines (99 loc) · 4.74 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NS:winuser.tagHELPWININFOA
HELPWININFOA (winuser.h)
Contains the size and position of either a primary or secondary Help window. An application can set this information by calling the WinHelp function with the HELP_SETWINPOS value. (ANSI)
*LPHELPWININFOA
*PHELPWININFOA
HELPWININFO
HELPWININFO structure [Windows Shell]
HELPWININFOA
LPHELPWININFO
LPHELPWININFO structure pointer [Windows Shell]
PHELPWININFO
PHELPWININFO structure pointer [Windows Shell]
_win32_HELPWININFO_str
shell.HELPWININFO_str
tagHELPWININFOA
tagHELPWININFOW
winuser/HELPWININFO
winuser/LPHELPWININFO
winuser/PHELPWININFO
shell\HELPWININFO_str.htm
shell
0de0bf84-66f3-44bc-b4de-c2de7ca90cb2
12/05/2018
*LPHELPWININFOA, *PHELPWININFOA, HELPWININFO, HELPWININFO structure [Windows Shell], HELPWININFOA, LPHELPWININFO, LPHELPWININFO structure pointer [Windows Shell], PHELPWININFO, PHELPWININFO structure pointer [Windows Shell], _win32_HELPWININFO_str, shell.HELPWININFO_str, tagHELPWININFOA, tagHELPWININFOW, winuser/HELPWININFO, winuser/LPHELPWININFO, winuser/PHELPWININFO
winuser.h
Windows
Windows XP [desktop apps only]
Windows 2000 Server [desktop apps only]
Windows
HELPWININFOA, *PHELPWININFOA, *LPHELPWININFOA
19H1
tagHELPWININFOA
winuser/tagHELPWININFOA
PHELPWININFOA
winuser/PHELPWININFOA
HELPWININFOA
winuser/HELPWININFOA
c++
APIRef
kbSyntax
HeaderDef
Winuser.h
HELPWININFO

HELPWININFOA structure

-description

Contains the size and position of either a primary or secondary Help window. An application can set this information by calling the WinHelp function with the HELP_SETWINPOS value.

-struct-fields

-field wStructSize

Type: int

The size of this structure, in bytes.

-field x

Type: int

X-coordinate of the upper-left corner of the window, in screen coordinates.

-field y

Type: int

Y-coordinate of the upper-left corner of the window, in screen coordinates.

-field dx

Type: int

The width of the window, in pixels.

-field dy

Type: int

The height of the window, in pixels.

-field wMax

Type: int

Options for display of the window. It can be any of the values that can be specified in the nCmdShow parameter for the ShowWindow function.

-field rgchMember

Type: TCHAR[2]

The name of the window.

-remarks

Windows Help divides the display into 1024 units in both the X and Y directions. To create a secondary window that fills the upper-left quadrant of the display, for example, an application would specify zero for the x and y members and 512 for the dx and dy members.

To calculate wStructSize properly, the actual size of the string to be stored at rgchMember must be known. Since sizeof(HELPWININFO) includes two TCHARs by definition, they must be taken into account in the final total. The following example shows the proper calculation of an instance of wStructSize.

WORD wSize;
TCHAR *szWndName = TEXT("wnd_menu"); 
size_t NameLength;  
HRESULT hr;
HELPWININFO hwi;

// StringCbLength returns the length of the string without 
// the terminating null character.
hr = StringCbLength(szWndName, STRSAFE_MAX_CCH * sizeof(TCHAR), &NameLength);
    
if (SUCCEEDED(hr))
{
    // Add bytes to account for the name string's terminating null character.
    NameLength + sizeof(TCHAR);
    
    // Determine the size of HELPWININFO without the TCHAR array.
    wSize = sizeof(HELPWININFO) - (2 * sizeof(TCHAR));
    
    // Determine the total size of the final HELPWININFO structure.
    hwi.wStructSize = wSize + NameLength;
}

Note

The winuser.h header defines HELPWININFO as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.