Changeset 1314 for trunk/src


Ignore:
Timestamp:
Oct 16, 1999, 12:28:31 PM (26 years ago)
Author:
sandervl
Message:

groupbox redraw + setpos fixes

Location:
trunk/src/user32
Files:
4 edited

Legend:

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

    r1258 r1314  
    1 /* $Id: button.cpp,v 1.9 1999-10-12 18:14:53 sandervl Exp $ */
     1/* $Id: button.cpp,v 1.10 1999-10-16 10:28:30 sandervl Exp $ */
    22/* File: button.cpp -- Button type widgets
    33 *
     
    163163static LRESULT BUTTON_EraseBkgnd(HWND hwnd,WPARAM wParam,LPARAM lParam)
    164164{
    165   return 1;
     165  //SvL: Erase background for groupboxes as the paint function only draws
     166  //     a box
     167  DWORD style = GetWindowLongA(hwnd,GWL_STYLE) & 0x0f;
     168//  if(style == BS_GROUPBOX) {
     169        return DefWindowProcA(hwnd, WM_ERASEBKGND, wParam, lParam);
     170//  }
     171//  return 1;
    166172}
    167173
     
    10651071    wndClass.cbWndExtra    = sizeof(BUTTONINFO);
    10661072    wndClass.hCursor       = LoadCursorA(0,IDC_ARROWA);
    1067     wndClass.hbrBackground = (HBRUSH)0;
     1073//    wndClass.hbrBackground = (HBRUSH)0;
     1074    wndClass.hbrBackground = GetSysColorBrush(COLOR_BTNFACE);
    10681075    wndClass.lpszClassName = BUTTONCLASSNAME;
    10691076
  • trunk/src/user32/pmwindow.cpp

    r1311 r1314  
    1 /* $Id: pmwindow.cpp,v 1.30 1999-10-15 13:52:54 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.31 1999-10-16 10:28:31 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    257257
    258258        if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break;
     259        if (!win32wnd->CanReceiveSizeMsgs())    break;
    259260
    260261        WinQueryWindowPos(hwnd, &swpOld);
     
    296297
    297298        if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break;
     299        if (!win32wnd->CanReceiveSizeMsgs())    break;
    298300
    299301        if(pswp->fl & (SWP_MOVE | SWP_SIZE)) {
     
    394396    goto RunDefWndProc;
    395397//        break;
    396     }
    397 
    398     case WM_ERASEBACKGROUND:
    399     {
    400         dprintf(("OS2: WM_ERASEBACKGROUND %x", win32wnd->getWindowHandle()));
    401         if (!win32wnd->isSupressErase()) {
    402             BOOL erased = sendEraseBkgnd (win32wnd);
    403             win32wnd->setEraseBkgnd (!erased, !erased);
    404         }
    405         break;
    406398    }
    407399
     
    851843    }
    852844
     845    case WM_ERASEBACKGROUND:
     846    {
     847        dprintf(("OS2: WM_ERASEBACKGROUND %x", win32wnd->getWindowHandle()));
     848        if (!win32wnd->isSupressErase()) {
     849            BOOL erased = sendEraseBkgnd (win32wnd);
     850            win32wnd->setEraseBkgnd (!erased, !erased);
     851        }
     852        break;
     853    }
     854
    853855    case WM_PAINT:
    854856        dprintf(("OS2: WM_PAINT %x", hwnd));
    855857
     858#if 0
    856859        if (WinQueryUpdateRect (hwnd, NULL)) {
    857860            if (!win32wnd->isSupressErase()) {
     
    861864        }
    862865        win32wnd->setSupressErase (FALSE);
    863 
     866#endif
    864867        if(win32wnd->MsgPaint(0, 0)) {
    865868                goto RunDefWndProc;
  • trunk/src/user32/win32wbase.cpp

    r1311 r1314  
    1 /* $Id: win32wbase.cpp,v 1.45 1999-10-15 13:52:54 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.46 1999-10-16 10:28:31 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    258258        return 0;
    259259  }
     260#ifdef DEBUG
     261  if(HIWORD(cs->lpszClass))
     262  {
     263        char *astring;
     264
     265        if(isUnicode) astring = UnicodeToAsciiString((LPWSTR)cs->lpszClass);
     266        else          astring = (char *)cs->lpszClass;
     267
     268        dprintf(("Window class %s", astring));
     269        if(isUnicode) FreeAsciiString(astring);
     270  }
     271  else  dprintf(("Window class %x", cs->lpszClass));
     272#endif
    260273
    261274  /* Fix the lpszClass field: from existing programs, it seems ok to call a CreateWindowXXX
     
    519532//        OS2HwndFrame = hwndClient;
    520533
     534  fNoSizeMsg = TRUE;
     535
    521536  if(OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32WNDPTR, (ULONG)this) == FALSE) {
    522537        dprintf(("WM_CREATE: WinSetWindowULong %X failed!!", OS2Hwnd));
     
    573588//  SetFakeOpen32();
    574589
     590  //Set icon from class
     591  if(windowClass->getIcon())
     592        SetIcon(windowClass->getIcon());
     593
    575594  /* Set the window menu */
    576595  if ((dwStyle & (WS_CAPTION | WS_CHILD)) == WS_CAPTION )
     
    589608        setWindowId((DWORD)cs->hMenu);
    590609  }
    591 
    592   //Set icon from class
    593   if(windowClass->getIcon())
    594         SetIcon(windowClass->getIcon());
    595610
    596611  //Subclass frame
     
    608623  maxPos.x = rectWindow.left; maxPos.y = rectWindow.top;
    609624
    610   fNoSizeMsg = TRUE;
    611625  if(getParent()) {
    612626        SetWindowPos(getParent()->getWindowHandle(), rectClient.left, rectClient.top,
  • trunk/src/user32/win32wbase.h

    r1311 r1314  
    1 /* $Id: win32wbase.h,v 1.23 1999-10-15 13:52:55 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.24 1999-10-16 10:28:31 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    163163         BOOL   IsDialog()                    { return fIsDialog; };
    164164
     165         BOOL   CanReceiveSizeMsgs()          { return !fNoSizeMsg; };
    165166         BOOL   IsWindowDestroyed()           { return fIsDestroyed; };
    166167         BOOL   IsWindowEnabled();
Note: See TracChangeset for help on using the changeset viewer.