Changeset 7241 for trunk/src


Ignore:
Timestamp:
Oct 28, 2001, 11:38:14 AM (24 years ago)
Author:
sandervl
Message:

setwindowlong fix for dialogs

Location:
trunk/src/user32
Files:
5 edited

Legend:

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

    r6019 r7241  
    1 /* $Id: win32dlg.cpp,v 1.70 2001-06-15 14:07:22 sandervl Exp $ */
     1/* $Id: win32dlg.cpp,v 1.71 2001-10-28 10:38:13 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    10831083    dialogFlags |= DF_END;
    10841084    idResult = retval;
     1085
    10851086    return TRUE;
    10861087}
    10871088//******************************************************************************
    10881089//******************************************************************************
    1089 LONG Win32Dialog::SetWindowLongA(int index, ULONG value, BOOL fUnicode)
     1090LONG Win32Dialog::SetWindowLong(int index, ULONG value, BOOL fUnicode)
    10901091{
    10911092    LONG oldval;
     
    10961097    case DWL_DLGPROC:
    10971098    {
    1098     //Note: Type of SetWindowLong determines new window proc type
     1099        //Note: Type of SetWindowLong determines new window proc type
    10991100        //      UNLESS the new window proc has already been registered
    11001101        //      (use the old type in that case)
    11011102        //      (VERIFIED in NT 4, SP6)
    11021103        WINDOWPROCTYPE type = WINPROC_GetProcType((HWINDOWPROC)value);
    1103     if(type == WIN_PROC_INVALID) {
    1104         type = (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A;
    1105     }
     1104        if(type == WIN_PROC_INVALID) {
     1105            type = (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A;
     1106        }
    11061107        oldval = (LONG)WINPROC_GetProc(Win32DlgProc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A);
    11071108        WINPROC_SetProc((HWINDOWPROC *)&Win32DlgProc, (WNDPROC)value, type, WIN_PROC_WINDOW);
     
    11171118        return oldval;
    11181119    default:
    1119         return Win32BaseWindow::SetWindowLongA(index, value);
    1120     }
    1121 }
    1122 //******************************************************************************
    1123 //******************************************************************************
    1124 ULONG Win32Dialog::GetWindowLongA(int index, BOOL fUnicode)
     1120        return Win32BaseWindow::SetWindowLong(index, value, fUnicode);
     1121    }
     1122}
     1123//******************************************************************************
     1124//******************************************************************************
     1125ULONG Win32Dialog::GetWindowLong(int index, BOOL fUnicode)
    11251126{
    11261127    dprintf2(("Win32Dialog::GetWindowLongA %x %d", getWindowHandle(), index));
     
    11341135        return userDlgData;
    11351136    default:
    1136         return Win32BaseWindow::GetWindowLongA(index);
     1137        return Win32BaseWindow::GetWindowLong(index, fUnicode);
    11371138    }
    11381139}
  • trunk/src/user32/win32dlg.h

    r5935 r7241  
    1 /* $Id: win32dlg.h,v 1.13 2001-06-09 14:50:21 sandervl Exp $ */
     1/* $Id: win32dlg.h,v 1.14 2001-10-28 10:38:13 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    7575virtual  ULONG  MsgCreate(HWND hwndOS2);
    7676
    77 virtual  LONG   SetWindowLongA(int index, ULONG value, BOOL fUnicode = FALSE);
    78 virtual  ULONG  GetWindowLongA(int index, BOOL fUnicode = FALSE);
     77virtual  LONG   SetWindowLong(int index, ULONG value, BOOL fUnicode);
     78virtual  ULONG  GetWindowLong(int index, BOOL fUnicode);
    7979
    8080static   ULONG  GetDialogBaseUnits()  { return MAKELONG(xBaseUnit, yBaseUnit); };
  • trunk/src/user32/win32wbase.cpp

    r7200 r7241  
    1 /* $Id: win32wbase.cpp,v 1.296 2001-10-25 10:40:45 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.297 2001-10-28 10:38:13 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    35893589//******************************************************************************
    35903590//******************************************************************************
    3591 LONG Win32BaseWindow::SetWindowLongA(int index, ULONG value, BOOL fUnicode)
     3591LONG Win32BaseWindow::SetWindowLong(int index, ULONG value, BOOL fUnicode)
    35923592{
    35933593 LONG oldval;
     
    36993699//******************************************************************************
    37003700//******************************************************************************
    3701 ULONG Win32BaseWindow::GetWindowLongA(int index, BOOL fUnicode)
     3701ULONG Win32BaseWindow::GetWindowLong(int index, BOOL fUnicode)
    37023702{
    37033703 ULONG value;
  • trunk/src/user32/win32wbase.h

    r7095 r7241  
    1 /* $Id: win32wbase.h,v 1.131 2001-10-17 14:30:10 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.132 2001-10-28 10:38:14 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    3434#define WINDOWFLAG_ACTIVE         1
    3535
    36 #define WIN32PM_MAGIC           0x12345678
    37 #define CheckMagicDword(a)      (a==WIN32PM_MAGIC)
     36#define WIN32PM_MAGIC             0x12345678
     37#define CheckMagicDword(a)        (a==WIN32PM_MAGIC)
     38
     39#define TYPE_ASCII                0
     40#define TYPE_UNICODE              1
    3841
    3942#define GW_HWNDNEXTCHILD          (0x10000 | GW_HWNDNEXT)
     
    165168         VOID   updateWindowStyle(DWORD oldExStyle,DWORD oldStyle);
    166169
    167 virtual  LONG   SetWindowLongA(int index, ULONG value, BOOL fUnicode = FALSE);
    168 virtual  ULONG  GetWindowLongA(int index, BOOL fUnicode = FALSE);
     170virtual  LONG   SetWindowLong(int index, ULONG value, BOOL fUnicode);
     171virtual  ULONG  GetWindowLong(int index, BOOL fUnicode);
    169172virtual  WORD   SetWindowWord(int index, WORD value);
    170173virtual  WORD   GetWindowWord(int index);
  • trunk/src/user32/windowword.cpp

    r5935 r7241  
    1 /* $Id: windowword.cpp,v 1.11 2001-06-09 14:50:26 sandervl Exp $ */
     1/* $Id: windowword.cpp,v 1.12 2001-10-28 10:38:14 sandervl Exp $ */
    22
    33/*
     
    2828    if(window)
    2929    {
    30         ret = window->SetWindowLongA(nIndex,lNewLong);
     30        ret = window->SetWindowLong(nIndex,lNewLong, TYPE_ASCII);
    3131        RELEASE_WNDOBJ(window);
    3232        return ret;
     
    4848    if(window)
    4949    {
    50         ret = window->SetWindowLongA(nIndex,lNewLong, TRUE);
     50        ret = window->SetWindowLong(nIndex,lNewLong, TYPE_UNICODE);
    5151        RELEASE_WNDOBJ(window);
    5252        return ret;
     
    110110    if(window)
    111111    {
    112         ret = window->GetWindowLongA(nIndex);
     112        ret = window->GetWindowLong(nIndex, TYPE_ASCII);
    113113        RELEASE_WNDOBJ(window);
    114114        return ret;
     
    131131    if(window)
    132132    {
    133         ret = window->GetWindowLongA(nIndex, TRUE);
     133        ret = window->GetWindowLong(nIndex, TYPE_UNICODE);
    134134        RELEASE_WNDOBJ(window);
    135135        return ret;
Note: See TracChangeset for help on using the changeset viewer.