Ignore:
Timestamp:
Aug 29, 1999, 10:05:08 PM (26 years ago)
Author:
sandervl
Message:

Mouse message handling changes

File:
1 edited

Legend:

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

    r724 r740  
    1 /* $Id: window.cpp,v 1.17 1999-08-28 14:09:30 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.18 1999-08-29 20:05:08 sandervl Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    8282//******************************************************************************
    8383//******************************************************************************
    84 HWND WIN32API CreateMDIWindowA(LPCSTR arg1, LPCSTR arg2, DWORD arg3,
    85                                int arg4, int arg5, int arg6, int arg7,
    86                                HWND arg8, HINSTANCE arg9, LPARAM  arg10)
    87 {
    88  HWND hwnd;
    89 
    90     dprintf(("USER32:  CreateMDIWindowA\n"));
    91 
    92     hwnd = O32_CreateMDIWindow((LPSTR)arg1, (LPSTR)arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
    93 
    94     dprintf(("USER32:  CreateMDIWindowA returned %X\n", hwnd));
    95     return hwnd;
    96 }
    97 //******************************************************************************
    98 //******************************************************************************
    99 HWND WIN32API CreateMDIWindowW(LPCWSTR arg1, LPCWSTR arg2, DWORD arg3, int arg4,
    100                                int arg5, int arg6, int arg7, HWND arg8, HINSTANCE arg9,
    101                                LPARAM arg10)
    102 {
    103  HWND hwnd;
    104  char *astring1 = NULL, *astring2 = NULL;
    105 
    106     if((int)arg1 >> 16 != 0) {
    107         astring1 = UnicodeToAsciiString((LPWSTR)arg1);
    108     }
    109     else    astring1 = (char *)arg2;
    110 
    111     astring2 = UnicodeToAsciiString((LPWSTR)arg2);
    112 
    113     hwnd = O32_CreateMDIWindow(astring1, astring2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
    114 
    115     if(astring1)    FreeAsciiString(astring1);
    116     FreeAsciiString(astring2);
    117     dprintf(("USER32:  CreateMDIWindowW hwnd = %X\n", hwnd));
    118     return(hwnd);
    119 }
    120 //******************************************************************************
    121 //******************************************************************************
    12284HWND WIN32API CreateWindowExW(DWORD exStyle, LPCWSTR className,
    12385                              LPCWSTR windowName, DWORD style, INT x,
     
    171133    }
    172134    return window->getWindowHandle();
     135}
     136//******************************************************************************
     137//******************************************************************************
     138HWND WIN32API CreateMDIWindowA(LPCSTR lpszClassName, LPCSTR lpszWindowName,
     139                               DWORD dwStyle, int x, int y, int nWidth,
     140                               int nHeight, HWND hwndParent,
     141                               HINSTANCE hInstance, LPARAM lParam )
     142{
     143 HWND hwnd;
     144 MDICREATESTRUCTA cs;
     145 Win32Window *window;
     146
     147    window = Win32Window::GetWindowFromHandle(hwndParent);
     148    if(!window) {
     149        dprintf(("CreateMDIWindowA, window %x not found", hwndParent));
     150        return 0;
     151    }
     152
     153    dprintf(("USER32:  CreateMDIWindowA\n"));
     154    cs.szClass        = lpszClassName;
     155    cs.szTitle        = lpszWindowName;
     156    cs.hOwner         = hInstance;
     157    cs.x              = x;
     158    cs.y              = y;
     159    cs.cx             = nHeight;
     160    cs.cy             = nWidth;
     161    cs.style          = dwStyle;
     162    cs.lParam         = lParam;
     163
     164    return window->SendMessageA(WM_MDICREATE, 0, (LPARAM)&cs);
     165}
     166//******************************************************************************
     167//******************************************************************************
     168HWND WIN32API CreateMDIWindowW(LPCWSTR lpszClassName, LPCWSTR lpszWindowName,
     169                               DWORD dwStyle, int x, int y, int nWidth,
     170                               int nHeight, HWND hwndParent,
     171                               HINSTANCE hInstance, LPARAM lParam )
     172{
     173 HWND hwnd;
     174 MDICREATESTRUCTW cs;
     175 Win32Window *window;
     176
     177    window = Win32Window::GetWindowFromHandle(hwndParent);
     178    if(!window) {
     179        dprintf(("CreateMDIWindowW, window %x not found", hwndParent));
     180        return 0;
     181    }
     182
     183    dprintf(("USER32:  CreateMDIWindowW\n"));
     184    cs.szClass        = lpszClassName;
     185    cs.szTitle        = lpszWindowName;
     186    cs.hOwner         = hInstance;
     187    cs.x              = x;
     188    cs.y              = y;
     189    cs.cx             = nHeight;
     190    cs.cy             = nWidth;
     191    cs.style          = dwStyle;
     192    cs.lParam         = lParam;
     193
     194    return window->SendMessageW(WM_MDICREATE, 0, (LPARAM)&cs);
    173195}
    174196//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.