Changeset 2033 for trunk/src/user32


Ignore:
Timestamp:
Dec 9, 1999, 1:54:05 AM (26 years ago)
Author:
sandervl
Message:

Unicode <-> Ascii translation changes + fixes for window procedures

Location:
trunk/src/user32
Files:
1 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/Makefile

    r1971 r2033  
    1 # $Id: Makefile,v 1.46 1999-12-05 00:31:46 sandervl Exp $
     1# $Id: Makefile,v 1.47 1999-12-09 00:53:36 sandervl Exp $
    22
    33#
     
    4242        winprop.obj wingdi.obj oslibgdi.obj winaccel.obj win32wbasepos.obj \
    4343        oslibres.obj dummy.obj oslibmenu.obj dc.obj timer.obj \
    44         caret.obj resource.obj \
     44        caret.obj resource.obj winproc.obj \
    4545        windlgmsg.obj windlg.obj win32wdesktop.obj
    4646
     
    129129pmwindow.obj:   pmwindow.cpp win32class.h win32wbase.h win32dlg.h pmwindow.h win32wndchild.h $(PDWIN32_INCLUDE)\wprocess.h oslibgdi.h oslibwin.h dc.h
    130130pmframe.obj: pmframe.cpp win32class.h win32wbase.h pmframe.h win32wndchild.h
    131 win32class.obj: win32class.cpp win32class.h win32wbase.h win32dlg.h gen_object.h $(PDWIN32_INCLUDE)\heapshared.h oslibwin.h win32wndchild.h
    132 win32wbase.obj:   win32wbase.cpp win32class.h win32wbase.h win32dlg.h gen_object.h $(PDWIN32_INCLUDE)\heapshared.h oslibwin.h win32wndchild.h  $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h dc.h pmframe.h win32wdesktop.h controls.h winmouse.h
     131win32class.obj: win32class.cpp win32class.h win32wbase.h win32dlg.h gen_object.h $(PDWIN32_INCLUDE)\heapshared.h oslibwin.h win32wndchild.h $(PDWIN32_INCLUDE)\win\winproc.h
     132win32wbase.obj:   win32wbase.cpp win32class.h win32wbase.h win32dlg.h gen_object.h $(PDWIN32_INCLUDE)\heapshared.h oslibwin.h win32wndchild.h  $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h dc.h pmframe.h win32wdesktop.h controls.h winmouse.h $(PDWIN32_INCLUDE)\win\winproc.h
    133133win32wbasepos.obj: win32wbasepos.cpp win32class.h win32wbase.h win32dlg.h gen_object.h $(PDWIN32_INCLUDE)\heapshared.h oslibwin.h win32wndchild.h  $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h dc.h pmframe.h win32wdesktop.h
    134134win32wnd.obj:   win32wnd.cpp win32class.h win32wbase.h win32wnd.h win32dlg.h gen_object.h $(PDWIN32_INCLUDE)\heapshared.h oslibwin.h win32wndchild.h  $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h oslibmenu.h
    135 win32dlg.obj:   win32dlg.cpp win32class.h win32wbase.h win32dlg.h gen_object.h $(PDWIN32_INCLUDE)\heapshared.h oslibwin.h win32wndchild.h oslibmsg.h controls.h
     135win32dlg.obj:   win32dlg.cpp win32class.h win32wbase.h win32dlg.h gen_object.h $(PDWIN32_INCLUDE)\heapshared.h oslibwin.h win32wndchild.h oslibmsg.h controls.h $(PDWIN32_INCLUDE)\win\winproc.h
    136136win32wndchild.obj: win32wndchild.cpp win32wndchild.h gen_object.h
    137137win32wmdiclient.obj: win32wmdiclient.cpp win32wbase.h win32wmdiclient.h win32wmdichild.h gen_object.h
     
    158158display.obj: display.cpp pmwindow.h
    159159
     160winproc.obj: winproc.cpp $(PDWIN32_INCLUDE)\win\winproc.h $(PDWIN32_INCLUDE)\heapcode.h
     161
    160162clean:
    161163        $(RM) *.obj *.lib *.dll *.map *.pch *.res *.lrf resource.asm *.lrf
  • trunk/src/user32/win32class.cpp

    r1606 r2033  
    1 /* $Id: win32class.cpp,v 1.6 1999-11-05 09:16:22 sandervl Exp $ */
     1/* $Id: win32class.cpp,v 1.7 1999-12-09 00:53:36 sandervl Exp $ */
    22/*
    33 * Win32 Window Class Managment Code for OS/2
     
    2323#include <win32class.h>
    2424#include <win32wnd.h>
     25#include <win\winproc.h>
    2526
    2627static fDestroyAll = FALSE;
     
    2930//Win32WndClass methods:
    3031//******************************************************************************
    31 Win32WndClass::Win32WndClass(WNDCLASSEXA *wndclass, BOOL isUnicode) : GenericObject(&wndclasses, OBJTYPE_CLASS)
    32 {
    33   this->isUnicode = isUnicode;
     32Win32WndClass::Win32WndClass(WNDCLASSEXA *wndclass, BOOL fUnicode) : GenericObject(&wndclasses, OBJTYPE_CLASS)
     33{
     34  isUnicode = fUnicode;
    3435  processId = 0;
    3536
     
    5960                AsciiToUnicode(classNameA, classNameW);
    6061        }
    61         classAtom = 0;
    62         //SvL: If a system control has already be registered, use that atom instead
     62    classAtom = 0;
     63    //SvL: If a system control has already be registered, use that atom instead
    6364        //     of creating a new one
    64         if(wndclass->style & CS_GLOBALCLASS) {
    65                 classAtom = GlobalFindAtomA(classNameA);
    66         }
    67         if(!classAtom) classAtom = GlobalAddAtomA(classNameA);
     65    if(wndclass->style & CS_GLOBALCLASS) {
     66        classAtom = GlobalFindAtomA(classNameA);
     67    }
     68    if(!classAtom) classAtom = GlobalAddAtomA(classNameA);
    6869  }
    6970  else {
     
    7374  }
    7475  if(!(wndclass->style & CS_GLOBALCLASS)) {
    75         processId = GetCurrentProcess();
     76    processId = GetCurrentProcess();
    7677  }
    7778  menuNameA = 0;
     
    105106
    106107  windowStyle           = wndclass->style;
    107   windowProc            = wndclass->lpfnWndProc;
     108  WINPROC_SetProc((HWINDOWPROC *)&windowProc, wndclass->lpfnWndProc, (isUnicode) ? WIN_PROC_32W : WIN_PROC_32A, WIN_PROC_CLASS);
    108109
    109110  //User data class words/longs
     
    126127{
    127128  if(classNameA) {
    128         dprintf(("Win32WndClass dtor, destroy class %s\n", classNameA));
     129    dprintf(("Win32WndClass dtor, destroy class %s\n", classNameA));
    129130  }
    130131
    131132  //SvL: Don't delete global classes
    132133  if(classNameA && !(windowStyle & CS_GLOBALCLASS)) {
    133         GlobalDeleteAtom(classAtom);
    134   }
     134    GlobalDeleteAtom(classAtom);
     135  }
     136
     137  WINPROC_FreeProc(windowProc, WIN_PROC_CLASS);
    135138
    136139  if(userClassLong)     free(userClassLong);
     
    158161  }
    159162  if(fUnicode) {
    160         if(classNameW)
    161                 return (lstrcmpW(classNameW, (LPWSTR)classname) == 0);
    162         return FALSE;
     163        if(classNameW)
     164            return (lstrcmpW(classNameW, (LPWSTR)classname) == 0);
     165        return FALSE;
    163166  }
    164167  else {
    165         if(classNameA)
    166                 return (strcmp(classNameA, classname) == 0);
    167         return FALSE;
     168        if(classNameA)
     169            return (strcmp(classNameA, classname) == 0);
     170        return FALSE;
    168171  }
    169172}
     
    234237{
    235238  if(windowStyle & CS_GLOBALCLASS)
    236         return TRUE;
     239    return TRUE;
    237240
    238241  return curProcessId = processId;
     
    251254  wndclass->lpszClassName = (classNameA) ? (LPCTSTR)classNameA : (LPCTSTR)classAtom;
    252255  wndclass->style         = windowStyle;
    253   wndclass->lpfnWndProc   = windowProc;
     256  wndclass->lpfnWndProc   = (WNDPROC)getClassLongA(GCL_WNDPROC, FALSE);
    254257  wndclass->hIconSm       = hIconSm;
    255258  return(TRUE);
     
    268271  wndclass->lpszClassName = (classNameW) ? (LPCWSTR)classNameW : (LPCWSTR)classAtom;
    269272  wndclass->style         = windowStyle;
    270   wndclass->lpfnWndProc   = windowProc;
     273  wndclass->lpfnWndProc   = (WNDPROC)getClassLongA(GCL_WNDPROC, TRUE);
    271274  wndclass->hIconSm       = hIconSm;
    272275  return(TRUE);
     
    335338//******************************************************************************
    336339//******************************************************************************
    337 ULONG Win32WndClass::getClassLongA(int index, BOOL isUnicode)
     340ULONG Win32WndClass::getClassLongA(int index, BOOL fUnicode)
    338341{
    339342  switch(index) {
     
    355358                return windowStyle;
    356359        case GCL_WNDPROC:
    357                 return (ULONG)windowProc;
     360                return (ULONG) WINPROC_GetProc(windowProc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A);
    358361        case GCW_ATOM: //TODO: does this really happen in windows?
    359362                SetLastError(ERROR_INVALID_PARAMETER);
     
    385388//TODO: What effects what immediately?
    386389//******************************************************************************
    387 ULONG Win32WndClass::setClassLongA(int index, LONG lNewVal, BOOL isUnicode)
     390ULONG Win32WndClass::setClassLongA(int index, LONG lNewVal, BOOL fUnicode)
    388391{
    389392 ULONG rc;
     
    423426                break;
    424427        case GCL_WNDPROC:
    425                 rc = (ULONG)windowProc;
    426                 windowProc = (WNDPROC)lNewVal;
     428                rc = (LONG)WINPROC_GetProc(windowProc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A );
     429                WINPROC_SetProc((HWINDOWPROC *)&windowProc, (WNDPROC)lNewVal, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A, WIN_PROC_CLASS );
    427430                break;
    428431        case GCW_ATOM: //TODO: does this really happen in windows?
  • trunk/src/user32/win32class.h

    r1762 r2033  
    1 /* $Id: win32class.h,v 1.5 1999-11-17 17:04:54 cbratschi Exp $ */
     1/* $Id: win32class.h,v 1.6 1999-12-09 00:53:37 sandervl Exp $ */
    22/*
    33 * Win32 Window Class Managment Code for OS/2
     
    1616{
    1717public:
    18         Win32WndClass(WNDCLASSEXA *wndclass, BOOL isUnicode = FALSE);
     18        Win32WndClass(WNDCLASSEXA *wndclass, BOOL fUnicode = FALSE);
    1919       ~Win32WndClass();
    2020
    21          ULONG  getClassLongA(int index, BOOL isUnicode = FALSE);
     21         ULONG  getClassLongA(int index, BOOL fUnicode = FALSE);
    2222         ULONG  getClassLongW(int index)
    2323         {
     
    2626         WORD   getClassWord(int index);
    2727
    28          ULONG  setClassLongA(int index, LONG lNewVal, BOOL isUnicode = FALSE);
     28         ULONG  setClassLongA(int index, LONG lNewVal, BOOL fUnicode = FALSE);
    2929         ULONG  setClassLongW(int index, LONG lNewVal)
    3030         {
     
    5656          DWORD GetWindowCount()        { return cWindows; };
    5757
    58           BOOL  hasClassName(LPSTR classname, BOOL fUnicode = 0);
     58          BOOL  hasClassName(LPSTR classname, BOOL fUnicode = FALSE);
    5959
    6060          BOOL  isAppClass(ULONG curProcessId);
  • trunk/src/user32/win32dlg.cpp

    r1762 r2033  
    1 /* $Id: win32dlg.cpp,v 1.35 1999-11-17 17:04:54 cbratschi Exp $ */
     1/* $Id: win32dlg.cpp,v 1.36 1999-12-09 00:53:37 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    1818#include <misc.h>
    1919#include <win32dlg.h>
     20#include <win\winproc.h>
    2021#include "oslibmsg.h"
    2122#include "oslibwin.h"
     
    174175
    175176    fIsDialog = TRUE;
    176     Win32DlgProc = dlgProc;
     177    WINPROC_SetProc((HWINDOWPROC *)&Win32DlgProc, (WNDPROC)dlgProc, (isUnicode) ? WIN_PROC_32W : WIN_PROC_32A, WIN_PROC_WINDOW);
    177178
    178179    this->tmpParam       = param;
     
    195196    if (hUserFont) DeleteObject( hUserFont );
    196197    if (hMenu) DestroyMenu( hMenu );
     198
     199    WINPROC_FreeProc(Win32DlgProc, WIN_PROC_WINDOW);
    197200}
    198201//******************************************************************************
     
    10191022//******************************************************************************
    10201023//******************************************************************************
    1021 LONG Win32Dialog::SetWindowLongA(int index, ULONG value)
     1024LONG Win32Dialog::SetWindowLongA(int index, ULONG value, BOOL fUnicode)
    10221025{
    10231026    LONG oldval;
     
    10271030    {
    10281031    case DWL_DLGPROC:
    1029         oldval = (LONG)Win32DlgProc;
    1030         Win32DlgProc = (DLGPROC)value;
     1032            oldval = (LONG)WINPROC_GetProc(Win32DlgProc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A);
     1033        WINPROC_SetProc((HWINDOWPROC *)&Win32DlgProc, (WNDPROC)value, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A, WIN_PROC_WINDOW);
    10311034        return oldval;
    10321035    case DWL_MSGRESULT:
     
    10441047//******************************************************************************
    10451048//******************************************************************************
    1046 ULONG Win32Dialog::GetWindowLongA(int index)
     1049ULONG Win32Dialog::GetWindowLongA(int index, BOOL fUnicode)
    10471050{
    10481051    dprintf2(("Win32Dialog::GetWindowLongA %x %d", getWindowHandle(), index));
     
    10501053    {
    10511054    case DWL_DLGPROC:
    1052         return (ULONG)Win32DlgProc;
     1055            return (ULONG)WINPROC_GetProc(Win32DlgProc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A);
    10531056    case DWL_MSGRESULT:
    10541057        return msgResult;
  • trunk/src/user32/win32dlg.h

    r1526 r2033  
    1 /* $Id: win32dlg.h,v 1.7 1999-10-31 01:14:42 sandervl Exp $ */
     1/* $Id: win32dlg.h,v 1.8 1999-12-09 00:53:37 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    7575virtual  ULONG  MsgCreate(HWND hwndFrame, HWND hwndClient);
    7676
    77 virtual  LONG   SetWindowLongA(int index, ULONG value);
    78 virtual  ULONG  GetWindowLongA(int index);
     77virtual  LONG   SetWindowLongA(int index, ULONG value, BOOL fUnicode = FALSE);
     78virtual  ULONG  GetWindowLongA(int index, BOOL fUnicode = FALSE);
    7979
    8080static   ULONG  GetDialogBaseUnits()  { return MAKELONG(xBaseUnit, yBaseUnit); };
  • trunk/src/user32/win32wbase.cpp

    r2016 r2033  
    1 /* $Id: win32wbase.cpp,v 1.107 1999-12-07 20:43:39 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.108 1999-12-09 00:53:37 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    268268//******************************************************************************
    269269//******************************************************************************
     270BOOL Win32BaseWindow::IsWindowUnicode()
     271{
     272    return (WINPROC_GetProcType(getWindowProc()) == WIN_PROC_32W);
     273}
     274//******************************************************************************
     275//******************************************************************************
    270276BOOL Win32BaseWindow::CreateWindowExA(CREATESTRUCTA *cs, ATOM classAtom)
    271277{
     
    434440  }
    435441
    436   setWindowProc(windowClass->getWindowProc());
     442  WINPROC_SetProc((HWINDOWPROC *)&win32wndproc, windowClass->getWindowProc(), (isUnicode) ? WIN_PROC_32W : WIN_PROC_32A, WIN_PROC_WINDOW);
    437443  hInstance = cs->hInstance;
    438444  dwStyle   = cs->style & ~WS_VISIBLE;
     
    627633  /* Get class or window DC if needed */
    628634  if(windowClass->getStyle() & CS_OWNDC) {
    629         dprintf(("Class with CS_OWNDC style"));
    630 //      ownDC = GetWindowDC(getWindowHandle());
    631   }
    632   else 
     635    dprintf(("Class with CS_OWNDC style"));
     636//  ownDC = GetWindowDC(getWindowHandle());
     637  }
     638  else
    633639  if (windowClass->getStyle() & CS_PARENTDC)  {
    634         dprintf(("ERROR: Class with CS_PARENTDC style -> NOT IMPLEMENTED!"));
    635         ownDC = 0;
     640    dprintf(("ERROR: Class with CS_PARENTDC style -> NOT IMPLEMENTED!"));
     641    ownDC = 0;
    636642  }
    637643  else
    638644  if (windowClass->getStyle() & CS_CLASSDC)  {
    639         dprintf(("ERROR: Class with CS_CLASSDC style -> NOT IMPLEMENTED!"));
    640         ownDC = 0;
     645    dprintf(("ERROR: Class with CS_CLASSDC style -> NOT IMPLEMENTED!"));
     646    ownDC = 0;
    641647  }
    642648  /* Set the window menu */
     
    15191525//******************************************************************************
    15201526//******************************************************************************
    1521 LRESULT Win32BaseWindow::DefWindowProcA(UINT Msg, WPARAM wParam, LPARAM lParam, BOOL fReentered)
    1522 {
    1523     //Lotus Notes v5.0.1 calls SetWindowTextA for unicode static window -> calls DefWindowProcA
    1524     if(IsUnicode() && !fReentered) {
    1525         return DefWindowProcW(Msg, wParam, lParam);
    1526     }
     1527LRESULT Win32BaseWindow::DefWindowProcA(UINT Msg, WPARAM wParam, LPARAM lParam)
     1528{
    15271529    switch(Msg)
    15281530    {
     
    17771779
    17781780    case WM_NOTIFYFORMAT:
    1779         if (IsUnicode()) return NFR_UNICODE;
     1781        if (IsWindowUnicode()) return NFR_UNICODE;
    17801782        else return NFR_ANSI;
    17811783
     
    18511853
    18521854    default:
    1853         return DefWindowProcA(Msg, wParam, lParam, TRUE);
     1855        return DefWindowProcA(Msg, wParam, lParam);
    18541856    }
    18551857}
     
    29502952BOOL Win32BaseWindow::SetWindowTextA(LPSTR lpsz)
    29512953{
    2952     //hmm. Notes v5.0.1 creates static window with CreateWindowExW and calls this...
    2953     if(IsUnicode() && lpsz) {
    2954         LPWSTR lpWindowNameW = (LPWSTR)alloca((strlen(lpsz)+1)*sizeof(WCHAR));
    2955         lstrcpyAtoW(lpWindowNameW, lpsz);
    2956 
    2957         return SendInternalMessageW(WM_SETTEXT,0,(LPARAM)lpWindowNameW);
    2958     }
    29592954    return SendInternalMessageA(WM_SETTEXT,0,(LPARAM)lpsz);
    29602955}
     
    29752970//******************************************************************************
    29762971//******************************************************************************
    2977 LONG Win32BaseWindow::SetWindowLongA(int index, ULONG value)
     2972LONG Win32BaseWindow::SetWindowLongA(int index, ULONG value, BOOL fUnicode)
    29782973{
    29792974 LONG oldval;
     
    30183013        }
    30193014        case GWL_WNDPROC:
    3020                 oldval = (LONG)getWindowProc();
    3021                 setWindowProc((WNDPROC)value);
     3015                oldval = (LONG)WINPROC_GetProc(win32wndproc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A);
     3016                WINPROC_SetProc((HWINDOWPROC *)&win32wndproc, (WNDPROC)value, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A, WIN_PROC_WINDOW);
    30223017                return oldval;
    30233018        case GWL_HINSTANCE:
     
    30483043//******************************************************************************
    30493044//******************************************************************************
    3050 ULONG Win32BaseWindow::GetWindowLongA(int index)
     3045ULONG Win32BaseWindow::GetWindowLongA(int index, BOOL fUnicode)
    30513046{
    30523047 ULONG value;
     
    30603055        break;
    30613056    case GWL_WNDPROC:
    3062         value = (ULONG)getWindowProc();
     3057        value = (LONG)WINPROC_GetProc(win32wndproc, (fUnicode) ? WIN_PROC_32W : WIN_PROC_32A);
    30633058        break;
    30643059    case GWL_HINSTANCE:
  • trunk/src/user32/win32wbase.h

    r2016 r2033  
    1 /* $Id: win32wbase.h,v 1.51 1999-12-07 20:43:40 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.52 1999-12-09 00:53:38 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    101101         VOID   updateWindowStyle(DWORD oldExStyle,DWORD oldStyle);
    102102
    103 virtual  LONG   SetWindowLongA(int index, ULONG value);
    104 virtual  ULONG  GetWindowLongA(int index);
     103virtual  LONG   SetWindowLongA(int index, ULONG value, BOOL fUnicode = FALSE);
     104virtual  ULONG  GetWindowLongA(int index, BOOL fUnicode = FALSE);
    105105virtual  WORD   SetWindowWord(int index, WORD value);
    106106virtual  WORD   GetWindowWord(int index);
     
    185185         BOOL   IsWindowEnabled();
    186186         BOOL   IsWindowVisible();
    187          BOOL   IsUnicode()  { return isUnicode; };
     187         //Created with CreateWindowExA or ExW
     188         BOOL   IsUnicode()                     { return isUnicode; };
     189         //Window procedure type
     190         BOOL   IsWindowUnicode();     
     191
    188192         BOOL   GetWindowRect(PRECT pRect);
    189193         int    GetWindowTextLength();
     
    216220static LRESULT  BroadcastMessageW(int type, UINT msg, WPARAM wParam, LPARAM lParam);
    217221
    218        LRESULT  DefWindowProcA(UINT Msg, WPARAM wParam, LPARAM lParam, BOOL fReentered = FALSE);
     222       LRESULT  DefWindowProcA(UINT Msg, WPARAM wParam, LPARAM lParam);
    219223       LRESULT  DefWindowProcW(UINT msg, WPARAM wParam, LPARAM lParam);
    220224
  • trunk/src/user32/win32wmdichild.cpp

    r1513 r2033  
    1 /* $Id: win32wmdichild.cpp,v 1.9 1999-10-30 09:19:46 sandervl Exp $ */
     1/* $Id: win32wmdichild.cpp,v 1.10 1999-12-09 00:53:38 sandervl Exp $ */
    22/*
    33 * Win32 MDI Child Window Class for OS/2
     
    4343//******************************************************************************
    4444//******************************************************************************
    45 Win32MDIChildWindow::Win32MDIChildWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL isUnicode)
     45Win32MDIChildWindow::Win32MDIChildWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL fUnicode)
    4646                    : Win32BaseWindow(OBJTYPE_WINDOW)
    4747{
    48     this->isUnicode = isUnicode;
     48    isUnicode = fUnicode;
    4949    CreateWindowExA(lpCreateStructA, classAtom);
    5050}
  • trunk/src/user32/win32wmdichild.h

    r1322 r2033  
    1 /* $Id: win32wmdichild.h,v 1.3 1999-10-16 14:51:43 sandervl Exp $ */
     1/* $Id: win32wmdichild.h,v 1.4 1999-12-09 00:53:38 sandervl Exp $ */
    22/*
    33 * Win32 MDI Client Window Class for OS/2
     
    2121{
    2222public:
    23                 Win32MDIChildWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL isUnicode);
     23                Win32MDIChildWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL fUnicode);
    2424virtual        ~Win32MDIChildWindow();
    2525
  • trunk/src/user32/window.cpp

    r1971 r2033  
    1 /* $Id: window.cpp,v 1.40 1999-12-05 00:31:49 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.41 1999-12-09 00:53:38 sandervl Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    956956
    957957    if (!repaint) flags |= SWP_NOREDRAW;
    958     dprintf(("MoveWindow: %04x %d,%d %dx%d %d\n", hwnd, x, y, cx, cy, repaint ));
     958    dprintf(("MoveWindow: %x %d,%d %dx%d %d\n", hwnd, x, y, cx, cy, repaint ));
    959959
    960960    return SetWindowPos( hwnd, 0, x, y, cx, cy, flags );
     
    12771277        return 0;
    12781278    }
    1279     return window->IsUnicode();
     1279    return window->IsWindowUnicode();
    12801280}
    12811281/*****************************************************************************
  • trunk/src/user32/windowmsg.cpp

    r1971 r2033  
    1 /* $Id: windowmsg.cpp,v 1.8 1999-12-05 00:31:50 sandervl Exp $ */
     1/* $Id: windowmsg.cpp,v 1.9 1999-12-09 00:53:38 sandervl Exp $ */
    22/*
    33 * Win32 window message APIs for OS/2
     
    930930 * Call a window procedure, translating args from Ansi to Unicode.
    931931 */
    932 static LRESULT WINPROC_CallProc32ATo32W( WNDPROC func, HWND hwnd,
    933                                          UINT msg, WPARAM wParam,
    934                                          LPARAM lParam )
     932LRESULT WINPROC_CallProc32ATo32W( WNDPROC func, HWND hwnd,
     933                                  UINT msg, WPARAM wParam,
     934                                  LPARAM lParam )
    935935{
    936936    LRESULT result;
     
    947947 * Call a window procedure, translating args from Unicode to Ansi.
    948948 */
    949 static LRESULT WINPROC_CallProc32WTo32A( WNDPROC func, HWND hwnd,
    950                                          UINT msg, WPARAM wParam,
    951                                          LPARAM lParam )
     949LRESULT WINPROC_CallProc32WTo32A( WNDPROC func, HWND hwnd,
     950                                  UINT msg, WPARAM wParam,
     951                                  LPARAM lParam )
    952952{
    953953    LRESULT result;
     
    958958    WINPROC_UnmapMsg32WTo32A( hwnd, msg, wParam, lParam );
    959959    return result;
    960 }
    961 /**********************************************************************
    962  *           CallWindowProc32A   
    963  */
    964 LRESULT WIN32API CallWindowProcA(
    965     WNDPROC func, /* window procedure */
    966     HWND hwnd, /* target window */
    967     UINT msg,  /* message */
    968     WPARAM wParam, /* message dependent parameter */
    969     LPARAM lParam    /* message dependent parameter */
    970 )
    971 {
    972 
    973     Win32BaseWindow *window = Win32BaseWindow::GetWindowFromHandle(hwnd);
    974     if(!window) {
    975         dprintf(("CallWindowProcA, window %x not found", hwnd));
    976         // return func( hwnd, msg, wParam, lParam );
    977         return 0;
    978     }
    979    
    980 //    dprintf(("CallWindowProcA(wndproc=%p,hwnd=%08x,msg=%08x,wp=%08x,lp=%08lx)",
    981   //                 func, hwnd, msg, wParam, lParam ));
    982 
    983 #if testing
    984     return func( hwnd, msg, wParam, lParam );
    985 #endif
    986 
    987     if(window->IsUnicode())
    988         return WINPROC_CallProc32ATo32W( func, hwnd, msg, wParam, lParam);
    989     else
    990         return func( hwnd, msg, wParam, lParam );
    991 }
    992 
    993 
    994 /**********************************************************************
    995  *           CallWindowProc32W    (USER32.19)
    996  */
    997 LRESULT WIN32API CallWindowProcW( WNDPROC func, HWND hwnd, UINT msg,
    998                                   WPARAM wParam, LPARAM lParam )
    999 {
    1000     Win32BaseWindow *window = Win32BaseWindow::GetWindowFromHandle(hwnd);
    1001     if(!window) {
    1002         dprintf(("CallWindowProcW, window %x not found", hwnd));
    1003         // return func( hwnd, msg, wParam, lParam );
    1004         return 0;
    1005     }
    1006    
    1007 //    dprintf(("CallWindowProcW(wndproc=%p,hwnd=%08x,msg=%08x,wp=%08x,lp=%08lx)",
    1008 //             func, hwnd, msg, wParam, lParam ));
    1009 
    1010 #if testing
    1011     return func( hwnd, msg, wParam, lParam );
    1012 #endif
    1013 
    1014     if(window->IsUnicode())
    1015         return func( hwnd, msg, wParam, lParam );
    1016     else
    1017         return WINPROC_CallProc32WTo32A( func, hwnd, msg, wParam, lParam);
    1018960}
    1019961//******************************************************************************
  • trunk/src/user32/windowword.cpp

    r1839 r2033  
    1 /* $Id: windowword.cpp,v 1.4 1999-11-25 19:22:04 sandervl Exp $ */
     1/* $Id: windowword.cpp,v 1.5 1999-12-09 00:53:39 sandervl Exp $ */
    22
    33/*
     
    6262    if(window)
    6363    {
    64       return window->SetWindowLongA(nIndex,lNewLong);
     64      return window->SetWindowLongA(nIndex,lNewLong, TRUE);
    6565    }
    6666    else
     
    151151    if(window)
    152152    {
    153         return window->GetWindowLongA(nIndex);
     153        return window->GetWindowLongA(nIndex, TRUE);
    154154    }
    155155    else
Note: See TracChangeset for help on using the changeset viewer.