Changeset 2211 for trunk/src


Ignore:
Timestamp:
Dec 27, 1999, 6:08:09 PM (26 years ago)
Author:
cbratschi
Message:

SetWindowPos fixed, edit: refresh only if visible

Location:
trunk/src/user32
Files:
5 edited

Legend:

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

    r2204 r2211  
    1 /* $Id: edit.cpp,v 1.25 1999-12-26 17:30:14 cbratschi Exp $ */
     1/* $Id: edit.cpp,v 1.26 1999-12-27 17:08:07 cbratschi Exp $ */
    22/*
    33 *      Edit control
     
    37253725  RECT rect;
    37263726
     3727  if (!IsWindowVisible(hwnd)) return;
     3728
    37273729  //CB: original controls redraws many times, cache drawing
    37283730  HideCaret(hwnd);
  • trunk/src/user32/oslibwin.cpp

    r2204 r2211  
    1 /* $Id: oslibwin.cpp,v 1.52 1999-12-26 17:30:15 cbratschi Exp $ */
     1/* $Id: oslibwin.cpp,v 1.53 1999-12-27 17:08:08 cbratschi Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    12001200  return WinEnableWindowUpdate(hwnd,fEnable);
    12011201}
     1202//******************************************************************************
     1203//******************************************************************************
     1204ULONG OSLibWinGetLastError()
     1205{
     1206  return WinGetLastError(GetThreadHAB()) & 0xFFFF;
     1207}
  • trunk/src/user32/oslibwin.h

    r2204 r2211  
    1 /* $Id: oslibwin.h,v 1.28 1999-12-26 17:30:16 cbratschi Exp $ */
     1/* $Id: oslibwin.h,v 1.29 1999-12-27 17:08:08 cbratschi Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    290290#define HTOS_ERROR                    (-3)
    291291
    292 BOOL OSLibWinEnableWindowUpdate(HWND hwnd,BOOL fEnable);
     292BOOL  OSLibWinEnableWindowUpdate(HWND hwnd,BOOL fEnable);
     293ULONG OSLibWinGetLastError();
    293294
    294295#endif //__OSLIBWIN_H__
  • trunk/src/user32/win32wbase.cpp

    r2208 r2211  
    1 /* $Id: win32wbase.cpp,v 1.120 1999-12-27 14:41:42 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.121 1999-12-27 17:08:08 cbratschi Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    548548  OSLibWinConvertStyle(dwStyle, &dwExStyle, &dwOSWinStyle, &dwOSFrameStyle, &borderWidth, &borderHeight);
    549549
    550   rectWindow.left   = cs->x;
    551   rectWindow.top    = cs->y;
    552   rectWindow.right  = cs->x + cs->cx;
    553   rectWindow.bottom = cs->y + cs->cy;
    554   rectClient        = rectWindow;
    555 
    556550  if(HIWORD(cs->lpszName))
    557551  {
     
    613607 POINT maxPos;
    614608 CREATESTRUCTA  *cs = tmpcs;  //pointer to CREATESTRUCT used in CreateWindowExA method
    615  RECT rectWndTmp, rectClientTmp;
    616609
    617610  OS2Hwnd      = hwndClient;
    618611  OS2HwndFrame = hwndFrame;
    619 
    620   //make backup copy of rectangles (some calls below result in WM_WINDOWPOSCHANGED with weird values since we haven't
    621   //set our window size just yet)
    622   rectWndTmp   = rectWindow;
    623   rectClientTmp = rectClient;
    624612
    625613  fNoSizeMsg = TRUE;
     
    700688  if (isChild()) FrameSetBorderSize(this,TRUE);
    701689
    702   //restore rectangles (some calls below result in WM_WINDOWPOSCHANGED with weird values since we haven't
    703   //set our window size just yet)
    704   rectWindow = rectWndTmp;
    705   rectClient = rectClientTmp;
    706 
    707690  /* Send the WM_CREATE message
    708691   * Perhaps we shouldn't allow width/height changes as well.
     
    711694  maxPos.x = rectWindow.left; maxPos.y = rectWindow.top;
    712695
    713   if(getParent()) {
    714         SetWindowPos(hwndLinkAfter, rectClient.left, rectClient.top,
    715                      rectClient.right-rectClient.left,
    716                      rectClient.bottom-rectClient.top,
    717                      SWP_NOACTIVATE | SWP_NOREDRAW);
    718   }
    719   else {
    720         SetWindowPos(hwndLinkAfter, rectClient.left, rectClient.top,
    721                      rectClient.right-rectClient.left,
    722                      rectClient.bottom-rectClient.top,
    723                      SWP_NOACTIVATE | SWP_NOREDRAW);
    724   }
     696  SetWindowPos(hwndLinkAfter,cs->x,cs->y,cs->cx,cs->cy,SWP_NOACTIVATE | SWP_NOREDRAW);
     697
    725698  //Note: Solitaire crashes when receiving WM_SIZE messages before WM_CREATE
    726699  fNoSizeMsg = FALSE;
     
    731704
    732705        SendNCCalcSize(FALSE, &rectWindow, NULL, NULL, 0, &rectClient );
    733 
    734706//        OffsetRect(&rectWindow, maxPos.x - rectWindow.left, maxPos.y - rectWindow.top);
    735707        if( (SendInternalMessageA(WM_CREATE, 0, (LPARAM)cs )) != -1 )
     
    24702442        Win32BaseWindow *wndBehind = Win32BaseWindow::GetWindowFromHandle(swp.hwndInsertBehind);
    24712443        if(wndBehind) {
    2472             swp.hwndInsertBehind   = wndBehind->getOS2WindowHandle();
     2444            swp.hwndInsertBehind   = wndBehind->getOS2FrameWindowHandle();
    24732445        }
    24742446        else {
     
    25032475    if (rc == FALSE)
    25042476    {
    2505         dprintf(("OSLibWinSetMultWindowPos failed!"));
    2506     }
    2507     else
    2508     {
    2509         if (fuFlags & SWP_FRAMECHANGED_W)
    2510             OSLibSendMessage (OS2HwndFrame, 0x42 /*WM_UPDATEFRAME*/, -1, 0);
    2511     }
     2477        dprintf(("OSLibWinSetMultWindowPos failed! Error %x",OSLibWinGetLastError()));
     2478    }
     2479
     2480    //SWP_FRAMECHANGED is ignored, not necessary for OS/2
    25122481
    25132482    return (rc);
  • trunk/src/user32/window.cpp

    r2200 r2211  
    1 /* $Id: window.cpp,v 1.44 1999-12-24 18:39:13 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.45 1999-12-27 17:08:09 cbratschi Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    847847    dprintf(("USER32: MapWindowPoints %x to %x (%d,%d) (%d)", hwndFrom, hwndTo, lpPoints->x, lpPoints->y, cPoints));
    848848    point.x = lpPoints->x;
    849     point.y = wndfrom->getWindowHeight() - lpPoints->y;
     849    point.y = wndfrom->getWindowHeight()-1-lpPoints->y;
    850850
    851851    OSLibWinMapWindowPoints(wndfrom->getOS2WindowHandle(), wndto->getOS2WindowHandle(), &point, 1);
    852     point.y = wndto->getWindowHeight() - point.y;
     852    point.y = wndto->getWindowHeight()-1-point.y;
    853853
    854854    short int xinc = point.x - lpPoints->x;
Note: See TracChangeset for help on using the changeset viewer.