Changeset 1105 for trunk/src/user32


Ignore:
Timestamp:
Oct 2, 1999, 6:09:13 AM (26 years ago)
Author:
sandervl
Message:

EB's window style fixes

Location:
trunk/src/user32
Files:
3 edited

Legend:

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

    r1091 r1105  
    1 /* $Id: oslibwin.cpp,v 1.10 1999-09-29 08:27:15 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.11 1999-10-02 04:09:12 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    5757  }
    5858
    59   if(dwFrameStyle) {
     59  if(dwFrameStyle || hwndParent == HWND_DESKTOP) {
    6060        ULONG dwClientStyle;
    6161
    6262        dwClientStyle = dwWinStyle & ~(WS_TABSTOP | WS_GROUP);
    63         if(pszName)
    64                 dwFrameStyle |= FCF_TITLEBAR;
     63//        if(pszName)
     64//                dwFrameStyle |= FCF_TITLEBAR;
    6565
    6666        dwFrameStyle |= FCF_TASKLIST | FCF_NOMOVEWITHOWNER | FCF_NOBYTEALIGN;
     
    9696        *OSWinStyle |= WS_MINIMIZED;
    9797//Done explicitely in CreateWindowExA
    98 #if 0
     98#if 1
    9999  if(dwStyle & WS_VISIBLE_W)
    100100        *OSWinStyle |= WS_VISIBLE;
     
    785785                            MPFROM2SHORT(pagesize, totalsize),
    786786                            0);
    787 }
    788 //******************************************************************************
    789 //******************************************************************************
    790 void OSLibWinChangeScrollStyle(HWND hwndParent, int scrollBar, int Reserved)
    791 {
    792  HWND hwndScroll;
    793 
    794    if(scrollBar == OSLIB_VSCROLL) {
    795         hwndScroll = WinWindowFromID(hwndParent, FID_VERTSCROLL);
    796    }
    797    else hwndScroll = WinWindowFromID(hwndParent, FID_HORZSCROLL);
    798 
    799    if(hwndScroll == NULL)
    800         return;
    801 
    802    WinSetWindowULong(hwndScroll, QWL_STYLE,
    803                      WinQueryWindowULong(hwndScroll, QWL_STYLE) |
    804                      SBS_AUTOTRACK | SBS_AUTOSIZE);
    805787}
    806788//******************************************************************************
     
    837819//******************************************************************************
    838820//******************************************************************************
     821void OSLibSetWindowStyle(HWND hwnd, ULONG dwStyle)
     822{
     823  ULONG OSWinStyle, OSFrameStyle;
     824
     825  OSLibWinConvertStyle(dwStyle, 0, &OSWinStyle, &OSFrameStyle);
     826
     827  WinSetWindowULong(hwnd, QWL_STYLE,
     828                    (WinQueryWindowULong(hwnd, QWL_STYLE) & ~0xffff0000) |
     829                    OSWinStyle);
     830}
     831//******************************************************************************
     832//******************************************************************************
  • trunk/src/user32/oslibwin.h

    r1091 r1105  
    1 /* $Id: oslibwin.h,v 1.6 1999-09-29 08:27:15 sandervl Exp $ */
     1/* $Id: oslibwin.h,v 1.7 1999-10-02 04:09:13 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    4040
    4141BOOL  OSLibWinConvertStyle(ULONG dwStyle, ULONG dwExStyle, ULONG *OSWinStyle, ULONG *OSFrameStyle);
     42void  OSLibSetWindowStyle(HWND hwnd, ULONG dwStyle);
    4243
    4344BOOL  OSLibWinSetWindowULong(HWND hwnd, ULONG offset, ULONG value);
     
    252253BOOL  OSLibWinSetScrollPageSize(HWND hwndParent, int scrollBar, int pagesize,
    253254                                int totalsize, int fRedraw);
    254 void  OSLibWinChangeScrollStyle(HWND hwndParent, int scrollBar, int Reserved);
    255255
    256256void  OSLibTranslateScrollCmdAndMsg(ULONG *msg, ULONG *scrollcmd);
  • trunk/src/user32/win32wbase.cpp

    r1093 r1105  
    1 /* $Id: win32wbase.cpp,v 1.20 1999-09-29 09:16:32 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.21 1999-10-02 04:09:13 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    455455        dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2Hwnd));
    456456        return FALSE;
    457   }
    458   if(cs->style & WS_HSCROLL) {
    459         OSLibWinChangeScrollStyle(OS2HwndFrame, OSLIB_HSCROLL, 0);
    460   }
    461   if(cs->style & WS_VSCROLL) {
    462         OSLibWinChangeScrollStyle(OS2HwndFrame, OSLIB_VSCROLL, 0);
    463457  }
    464458#if 0
     
    12501244}
    12511245//******************************************************************************
     1246//******************************************************************************
     1247BOOL Win32BaseWindow::isMDIClient()
     1248{
     1249    return FALSE;
     1250}
     1251//******************************************************************************
    12521252//TODO: Not complete (flags)
    12531253//******************************************************************************
     
    13971397    switch(Msg)
    13981398    {
     1399    case WM_CLOSE:
     1400        DestroyWindow();
     1401        return 0;
     1402
    13991403    case WM_GETTEXTLENGTH:
    14001404        return wndNameLength;
     
    18651869        break;
    18661870    }
    1867     return OSLibWinShowWindow(OS2HwndFrame, showstate);
     1871    BOOL rc = OSLibWinShowWindow(OS2HwndFrame, showstate);
     1872    return rc;
    18681873}
    18691874//******************************************************************************
     
    23052310                oldval = dwStyle;
    23062311                setStyle(value);
     2312                OSLibSetWindowStyle(OS2HwndFrame, dwStyle);
    23072313                return oldval;
    23082314        case GWL_WNDPROC:
Note: See TracChangeset for help on using the changeset viewer.