Shell Functions


ShellAbout Function

Displays a ShellAbout dialog box.

Syntax

int ShellAbout(      
    HWND hWnd,     LPCTSTR szApp,     LPCTSTR szOtherStuff,     HICON hIcon );

Parameters

hWnd
[in] A window handle to a parent window. This parameter can be NULL.
szApp
[in] A pointer to a null-terminated string that contains text to be displayed in the title bar of the ShellAbout dialog box and on the first line of the dialog box after the text "Microsoft". If the text contains a separator (#) that divides it into two parts, the function displays the first part in the title bar and the second part on the first line after the text "Microsoft".

Microsoft Windows 2000, Windows XP, Windows Server 2003: If the string pointed to by this parameter contains a separator (#), then the string must be writeable.

Windows Vista, Windows Server 2008: This string cannot exceed 200 characters in length.

szOtherStuff
[in] A pointer to a null-terminated string that contains text to be displayed in the dialog box after the version and copyright information. This parameter can be NULL.
hIcon
[in] The handle of an icon that the function displays in the dialog box. This parameter can be NULL, in which case the function displays the Windows or Microsoft Windows NT icon.

Return Value

TRUE if successful; otherwise, FALSE.

Remarks

Note that the ShellAbout function dialog box uses text and a default icon that are specific to either Windows or Windows NT.

To see an example of a ShellAbout dialog box, choose About Windows from the Help menu drop-down list in Windows Explorer.

Windows 95/98/Me: ShellAbout is supported by the Microsoft Layer for Unicode (MSLU). To use MSLU, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows Me/98/95 Systems.

Function Information

Minimum DLL Versionshell32.dll version 3.51 or later
Custom ImplementationNo
Headershellapi.h
Import libraryshell32.lib
Minimum operating systems Windows NT 3.5, Windows 95
UnicodeImplemented as ANSI and Unicode versions.
Tags :


Community Content

David Lowndes
szApp parameter should be writable (LPTSTR) if it contains the # separator

The implementation of this function (under XP SP2 at least) appears to write to the szApp string if you use the # separator. If you use this format you should use it like this to ensure you're passing a writable string:

TCHAR Txt[] = TEXT("First part...#Second part...");

ShellAbout( hWnd, Txt, T("Other stuff..."), NULL );

Tags :

Medinoc
Remark about the implementation problem
Only the unicode implementation ShellAboutW() attempts to modify the string. The ANSI version ShellAboutA() is protected from the problem because it allocates a temporary string for conversion, before calling ShellAboutW().
Tags :

Page view tracker