Changeset 85 for trunk/src


Ignore:
Timestamp:
Jun 9, 1999, 10:53:30 PM (26 years ago)
Author:
phaller
Message:

Add: added GetDlgItemTextW() API

File:
1 edited

Legend:

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

    r57 r85  
    1 /* $Id: user32.cpp,v 1.5 1999-06-08 18:59:07 phaller Exp $ */
     1/* $Id: user32.cpp,v 1.6 1999-06-09 20:53:30 phaller Exp $ */
    22
    33/*
     
    20442044    return O32_GetDlgItemInt(arg1, arg2, arg3, arg4);
    20452045}
    2046 //******************************************************************************
    2047 //******************************************************************************
    2048 UINT WIN32API GetDlgItemTextW( HWND arg1, int arg2, LPWSTR arg3, UINT  arg4)
    2049 {
    2050 #ifdef DEBUG
    2051     WriteLog("USER32:  GetDlgItemTextW NOT WORKING\n");
    2052 #endif
    2053     // NOTE: This will not work as is (needs UNICODE support)
    2054     return 0;
    2055 //    return O32_GetDlgItemText(arg1, arg2, arg3, arg4);
    2056 }
     2046
     2047
     2048/*****************************************************************************
     2049 * Name      : UINT WIN32API GetDlgItemTextW
     2050 * Purpose   : Determine the text of a window control
     2051 * Parameters: HWND   arg1
     2052 *             int    arg2
     2053 *             LPWSTR arg3
     2054 *             UINT   arg4
     2055 * Variables :
     2056 * Result    :
     2057 * Remark    :
     2058 * Status    : UNTESTED UNKNOWN STUB
     2059 *
     2060 * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
     2061 *****************************************************************************/
     2062
     2063UINT WIN32API GetDlgItemTextW(HWND   arg1,
     2064                              int    arg2,
     2065                              LPWSTR arg3,
     2066                              UINT   arg4)
     2067{
     2068  LPSTR lpBuffer;                   /* temporary buffer for the ascii result */
     2069  UINT  uiResult;                   /* return value of the ascii variant     */
     2070
     2071  dprintf(("USER32: GetDlgItemTextW(%08xh,%08xh,%08xh,%08xh)\n",
     2072           arg1,
     2073           arg2,
     2074           arg3,
     2075           arg4));
     2076
     2077
     2078  lpBuffer = (LPSTR)malloc(arg4);              /* allocate temporary buffer */
     2079  uiResult = GetDlgItemTextA(arg1,             /* call ascii variant        */
     2080                             arg2,
     2081                             lpBuffer,
     2082                             arg4);
     2083
     2084  AsciiToUnicodeN(lpBuffer,                /* now convert result to unicode */
     2085                  arg3,
     2086                  arg4);
     2087
     2088  free(lpBuffer);                              /* free the temporary buffer */
     2089
     2090  return (uiResult);                                       /* OK, that's it */
     2091}
     2092
     2093
    20572094//******************************************************************************
    20582095//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.