Ignore:
Timestamp:
Jun 9, 1999, 11:05:24 PM (26 years ago)
Author:
phaller
Message:

Add: added support for ShellAboutW API :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/shell32.cpp

    r77 r87  
    1 /* $Id: shell32.cpp,v 1.4 1999-06-09 15:22:27 phaller Exp $ */
     1/* $Id: shell32.cpp,v 1.5 1999-06-09 21:05:24 phaller Exp $ */
    22
    33/*
     
    8181                         HICON   hIcon)
    8282{
    83   dprintf(("SHELL32: ShellAboutA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
     83  dprintf(("SHELL32: ShellAboutA(%08xh,%08xh,%08xh,%08xh) not implemented properly.\n",
    8484           hwnd,
    8585           szApp,
     
    9898  return(TRUE);
    9999}
    100 //******************************************************************************
    101 //******************************************************************************
    102 int WIN32API ShellAboutW(HWND   hwnd,
     100
     101
     102/*****************************************************************************
     103 * Name      : DWORD ShellAboutW
     104 * Purpose   : display a simple about box
     105 * Parameters: HWND    hwnd
     106 *             LPWSTR  szApplication
     107 *             LPWSTR  szMoreInformation
     108 *             HICON   hIcon
     109 * Variables :
     110 * Result    :
     111 * Remark    :
     112 * Status    : UNTESTED
     113 *
     114 * Author    : Patrick Haller [Tue, 1999/06/01 09:00]
     115 *****************************************************************************/
     116
     117int WIN32API ShellAboutW(HWND    hwnd,
    103118                         LPCWSTR szApp,
    104119                         LPCWSTR szOtherStuff,
    105                          HICON  hIcon)
    106 {
    107   dprintf(("SHELL32: ShellAboutW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
     120                         HICON   hIcon)
     121{
     122  LPSTR lpszApp;                     /* temporary buffers for A-W conversion */
     123  LPSTR lpszOtherStuff;
     124  int   iResult;
     125
     126  dprintf(("SHELL32: ShellAboutW(%08xh,%08xh,%08xh,%08xh).\n",
    108127           hwnd,
    109128           szApp,
     
    111130           hIcon));
    112131
    113   return(TRUE);
     132  if (szApp != NULL)                             /* convert string on demand */
     133    lpszApp = UnicodeToAsciiString((LPWSTR)szApp);
     134  else
     135    lpszApp = NULL;
     136
     137  if (szOtherStuff != NULL)
     138    lpszOtherStuff = UnicodeToAsciiString((LPWSTR)szOtherStuff);
     139  else
     140    lpszOtherStuff = NULL;
     141
     142  iResult = ShellAboutA(hwnd,                          /* call ascii variant */
     143                        lpszApp,
     144                        lpszOtherStuff,
     145                        hIcon);
     146
     147  if (lpszApp != NULL)                            /* free strings as created */
     148     FreeAsciiString(lpszApp);
     149
     150  if (lpszOtherStuff != NULL)
     151     FreeAsciiString(lpszOtherStuff);
     152
     153  return(iResult);
    114154}
    115155//******************************************************************************
     
    14741514}
    14751515
     1516
    14761517/*****************************************************************************
    14771518 * Name      : DWORD ShellMessageBoxA
Note: See TracChangeset for help on using the changeset viewer.