Changeset 2221 for trunk/src


Ignore:
Timestamp:
Dec 27, 1999, 11:54:49 PM (26 years ago)
Author:
cbratschi
Message:

* empty log message *

Location:
trunk/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/trackbar.c

    r1762 r2221  
    1 /* $Id: trackbar.c,v 1.23 1999-11-17 17:06:23 cbratschi Exp $ */
     1/* $Id: trackbar.c,v 1.24 1999-12-27 22:54:49 cbratschi Exp $ */
    22/*
    33 * Trackbar control
     
    9595      for (i = 0;i < infoPtr->uNumTics;i++)
    9696      {
    97         if (infoPtr->tics[i] >= infoPtr->nRangeMin && infoPtr->tics[i] <= infoPtr->nRangeMax)
     97        if ((infoPtr->tics[i] >= infoPtr->nRangeMin) && (infoPtr->tics[i] <= infoPtr->nRangeMax))
    9898        {
    9999          oldTics[count] = infoPtr->tics[i];
     
    109109    }
    110110
    111     if (infoPtr->uTicFreq && infoPtr->nRangeMax > infoPtr->nRangeMin && (dwStyle & TBS_AUTOTICKS))
     111    if (infoPtr->uTicFreq && (infoPtr->nRangeMax > infoPtr->nRangeMin) && (dwStyle & TBS_AUTOTICKS))
    112112    {
    113113      //Tics without start and end tic
     
    191191      channel->bottom = lpRect.bottom-CHANNEL_SPACE;
    192192
    193       if (dwStyle & TBS_BOTH || dwStyle & TBS_NOTICKS)
     193      if ((dwStyle & TBS_BOTH) || (dwStyle & TBS_NOTICKS))
    194194      { //center
    195195        channel->left  = (lpRect.right-channelSize)/2;
     
    208208      channel->left = lpRect.left+CHANNEL_SPACE;
    209209      channel->right = lpRect.right-CHANNEL_SPACE;
    210       if (dwStyle & TBS_BOTH || dwStyle & TBS_NOTICKS)
     210      if ((dwStyle & TBS_BOTH) || (dwStyle & TBS_NOTICKS))
    211211      { //center
    212212        channel->top    = (lpRect.bottom-channelSize)/2;
     
    281281    range = infoPtr->nRangeMax-infoPtr->nRangeMin;
    282282
    283     if (range <= 0 || selMin == selMax) SetRectEmpty(selection);
     283    if ((range <= 0) || (selMin == selMax)) SetRectEmpty(selection);
    284284    else
    285285        if (!(GetWindowLongA(hwnd, GWL_STYLE) & TBS_VERT))
     
    494494      RECT thumb = infoPtr->rcThumb;
    495495
    496       if (infoPtr->flags & TB_DRAG_MODE || !IsWindowEnabled(hwnd)) hbr = CreateSolidBrush(GetSysColor(COLOR_3DHILIGHT));
     496      if ((infoPtr->flags & TB_DRAG_MODE) || !IsWindowEnabled(hwnd)) hbr = CreateSolidBrush(GetSysColor(COLOR_3DHILIGHT));
    497497      else hbr = CreateSolidBrush(GetSysColor(COLOR_3DFACE));
    498498      hbrOld = SelectObject(hdc,hbr);
     
    803803
    804804        //check if maximum of visible marks is reached
    805         if (dwStyle & TBS_AUTOTICKS && infoPtr->uNumTics > 1 && (INT)(width*infoPtr->tics[0]/range) == (INT)(width*infoPtr->tics[1]/range))
     805        if ((dwStyle & TBS_AUTOTICKS) && (infoPtr->uNumTics > 1) && ((INT)(width*infoPtr->tics[0]/range) == (INT)(width*infoPtr->tics[1]/range)))
    806806        {
    807807          //draw all pixels at once -> much faster
     
    902902     infoPtr->flags &= ~TB_DRAGPOSVALID;
    903903   }
    904    if (!mustRedraw && infoPtr->nPos == lastPos) return;
     904   if (!mustRedraw && (infoPtr->nPos == lastPos)) return;
    905905
    906906   if (dwStyle & TBS_NOTHUMB) return;
     
    931931   if (dwStyle & TBS_VERT)
    932932   {
    933      if (lastRect.top > newRect.top && lastRect.top < newRect.bottom)
     933     if ((lastRect.top > newRect.top) && (lastRect.top < newRect.bottom))
    934934       BitBlt(hdc,newRect.left,newRect.top,newRect.right-newRect.left,lastRect.bottom-newRect.top,hdcCompatible,newRect.left,newRect.top,SRCCOPY);
    935      else if (lastRect.bottom < newRect.bottom && lastRect.bottom > newRect.top)
     935     else if ((lastRect.bottom < newRect.bottom) && (lastRect.bottom > newRect.top))
    936936       BitBlt(hdc,lastRect.left,lastRect.top,lastRect.right-lastRect.left,newRect.bottom-lastRect.top,hdcCompatible,lastRect.left,lastRect.top,SRCCOPY);
    937937     else
     
    942942   } else
    943943   {
    944      if (lastRect.right > newRect.left && lastRect.right < newRect.right)
     944     if ((lastRect.right > newRect.left) && (lastRect.right < newRect.right))
    945945       BitBlt(hdc,lastRect.left,lastRect.top,newRect.right-lastRect.left,lastRect.bottom-lastRect.top,hdcCompatible,lastRect.left,lastRect.top,SRCCOPY);
    946      else if (lastRect.left < newRect.right && lastRect.left > newRect.left)
     946     else if ((lastRect.left < newRect.right) && (lastRect.left > newRect.left))
    947947       BitBlt(hdc,newRect.left,newRect.top,lastRect.right-newRect.left,newRect.bottom-newRect.top,hdcCompatible,newRect.left,newRect.top,SRCCOPY);
    948948     else
     
    13271327      newMax = x;
    13281328    }
    1329     if (newMin == infoPtr->nRangeMin && newMax == infoPtr->nRangeMax) return 0;
     1329    if ((newMin == infoPtr->nRangeMin) && (newMax == infoPtr->nRangeMax)) return 0;
    13301330
    13311331    infoPtr->nRangeMin = newMin;
     
    14541454    newMax = (INT)HIWORD(lParam);
    14551455
    1456     if (infoPtr->nSelMin == newMin && infoPtr->nSelMax == newMax) return 0;
     1456    if ((infoPtr->nSelMin == newMin) && (infoPtr->nSelMax == newMax)) return 0;
    14571457    infoPtr->nSelMin = newMin;
    14581458    infoPtr->nSelMax = newMax;
     
    14671467    if (!GetWindowLongA(hwnd, GWL_STYLE) & TBS_ENABLESELRANGE) return 0;
    14681468
    1469     if (oldMin != newMin || oldMax != newMax)
     1469    if ((oldMin != newMin) || (oldMax != newMax))
    14701470    {
    14711471      infoPtr->flags |= TB_SELECTIONCHANGED;
     
    16131613    if (dwStyle & TBS_VERT)
    16141614    {
    1615       if (wParam == TBTS_LEFT || wParam == TBTS_RIGHT) infoPtr->fLocation = (INT)wParam;
     1615      if ((wParam == TBTS_LEFT) || (wParam == TBTS_RIGHT)) infoPtr->fLocation = (INT)wParam;
    16161616    } else
    16171617    {
    1618       if (wParam == TBTS_TOP || wParam == TBTS_BOTTOM) infoPtr->fLocation = (INT)wParam;
     1618      if ((wParam == TBTS_TOP) || (wParam == TBTS_BOTTOM)) infoPtr->fLocation = (INT)wParam;
    16191619    }
    16201620
     
    18151815    fullThumb = infoPtr->rcFullThumb;
    18161816    if ((vertical &&
    1817          clickPoint.y >= thumb.top &&
    1818          clickPoint.y <= thumb.bottom &&
    1819          ((dwStyle & TBS_BOTH &&
    1820            clickPoint.x >= thumb.left &&
    1821            clickPoint.x <= thumb.right
     1817         (clickPoint.y >= thumb.top) &&
     1818         (clickPoint.y <= thumb.bottom) &&
     1819         (((dwStyle & TBS_BOTH) &&
     1820           (clickPoint.x >= thumb.left) &&
     1821           (clickPoint.x <= thumb.right)
    18221822          ) ||
    1823           (dwStyle & TBS_LEFT &&
    1824            clickPoint.x <= thumb.right &&
    1825            (clickPoint.x >= thumb.left ||
    1826             (clickPoint.x >= fullThumb.left &&
    1827              (thumb.left-clickPoint.x <= clickPoint.y-thumb.top &&
    1828               thumb.left-clickPoint.x <= thumb.bottom-clickPoint.y
     1823          ((dwStyle & TBS_LEFT) &&
     1824           (clickPoint.x <= thumb.right) &&
     1825           ((clickPoint.x >= thumb.left) ||
     1826            ((clickPoint.x >= fullThumb.left) &&
     1827             ((thumb.left-clickPoint.x <= clickPoint.y-thumb.top) &&
     1828              (thumb.left-clickPoint.x <= thumb.bottom-clickPoint.y)
    18291829             )
    18301830            )
     
    18321832          ) ||
    18331833          (!(dwStyle & (TBS_BOTH | TBS_LEFT)) &&
    1834            clickPoint.x >= thumb.left &&
    1835            (clickPoint.x <= thumb.right ||
    1836             (clickPoint.x <= fullThumb.right &&
    1837              (clickPoint.x-thumb.right <= clickPoint.y-thumb.top &&
    1838               clickPoint.x-thumb.right <= thumb.bottom-clickPoint.y
     1834           (clickPoint.x >= thumb.left) &&
     1835           ((clickPoint.x <= thumb.right) ||
     1836            ((clickPoint.x <= fullThumb.right) &&
     1837             ((clickPoint.x-thumb.right <= clickPoint.y-thumb.top) &&
     1838              (clickPoint.x-thumb.right <= thumb.bottom-clickPoint.y)
    18391839             )
    18401840            )
     
    18431843        ) ||
    18441844        (!vertical &&
    1845          clickPoint.x >= thumb.left &&
    1846          clickPoint.x <= thumb.right &&
    1847          ((dwStyle & TBS_BOTH &&
    1848            clickPoint.y >= thumb.top &&
    1849            clickPoint.y <= thumb.bottom
     1845         (clickPoint.x >= thumb.left) &&
     1846         (clickPoint.x <= thumb.right) &&
     1847         (((dwStyle & TBS_BOTH) &&
     1848           (clickPoint.y >= thumb.top) &&
     1849           (clickPoint.y <= thumb.bottom)
    18501850          ) ||
    1851           (dwStyle & TBS_TOP &&
    1852            clickPoint.y <= thumb.bottom &&
    1853            (clickPoint.y >= thumb.top ||
    1854             (clickPoint.y >= fullThumb.top &&
    1855              (thumb.top-clickPoint.y <= clickPoint.x-thumb.left &&
    1856               thumb.top-clickPoint.y <= thumb.right-clickPoint.x
     1851          ((dwStyle & TBS_TOP) &&
     1852           (clickPoint.y <= thumb.bottom) &&
     1853           ((clickPoint.y >= thumb.top) ||
     1854            ((clickPoint.y >= fullThumb.top) &&
     1855             ((thumb.top-clickPoint.y <= clickPoint.x-thumb.left) &&
     1856              (thumb.top-clickPoint.y <= thumb.right-clickPoint.x)
    18571857             )
    18581858            )
     
    18601860          ) ||
    18611861          (!(dwStyle & (TBS_BOTH | TBS_TOP)) &&
    1862            clickPoint.y >= thumb.top &&
    1863            (clickPoint.y <= thumb.bottom ||
    1864             (clickPoint.y <= fullThumb.bottom &&
    1865              (clickPoint.y-thumb.bottom <= clickPoint.x-thumb.left &&
    1866               clickPoint.y-thumb.bottom <= thumb.right-clickPoint.x
     1862           (clickPoint.y >= thumb.top) &&
     1863           ((clickPoint.y <= thumb.bottom) ||
     1864            ((clickPoint.y <= fullThumb.bottom) &&
     1865             ((clickPoint.y-thumb.bottom <= clickPoint.x-thumb.left) &&
     1866              (clickPoint.y-thumb.bottom <= thumb.right-clickPoint.x)
    18671867             )
    18681868            )
  • trunk/src/gdi32/line.cpp

    r2092 r2221  
    1 /* $Id: line.cpp,v 1.2 1999-12-16 16:52:32 cbratschi Exp $ */
     1/* $Id: line.cpp,v 1.3 1999-12-27 22:52:39 cbratschi Exp $ */
    22/*
    33 * Line API's
     
    1919VOID toWin32LineEnd(PPOINTLOS2 startPt,INT nXEnd,INT nYEnd,PPOINTLOS2 pt)
    2020{
    21   if (startPt->x != nXEnd || startPt->y != nYEnd)
     21  if ((startPt->x != nXEnd) || (startPt->y != nYEnd))
    2222  {
    2323    if (nXEnd == startPt->x)
     
    5151  if (!GetObjectA(GetCurrentObject(hdc,OBJ_PEN),sizeof(penInfo),(LPVOID)&penInfo)) return FALSE;
    5252
    53   if (penInfo.lopnWidth.x > 1 || penInfo.lopnWidth.y > 1)
    54   {
    55     if (penInfo.lopnStyle != PS_INSIDEFRAME && penInfo.lopnStyle != PS_SOLID)
     53  if ((penInfo.lopnWidth.x > 1) || (penInfo.lopnWidth.y > 1))
     54  {
     55    if ((penInfo.lopnStyle != PS_INSIDEFRAME) && (penInfo.lopnStyle != PS_SOLID))
    5656      return FALSE;
    5757
     
    117117    toWin32LineEnd(&oldPoint,nXEnd,nYEnd,&newPoint);
    118118
    119     if (oldPoint.x == newPoint.x && oldPoint.y == newPoint.y)
     119    if ((oldPoint.x == newPoint.x) && (oldPoint.y == newPoint.y))
    120120    {
    121121      rc = drawSingleLinePoint(hdc,pHps,&newPoint);
  • trunk/src/gdi32/text.cpp

    r2092 r2221  
    1 /* $Id: text.cpp,v 1.5 1999-12-16 16:52:33 cbratschi Exp $ */
     1/* $Id: text.cpp,v 1.6 1999-12-27 22:52:39 cbratschi Exp $ */
    22
    33/*
     
    9999  LONG lTabs,xLeft,yTop;
    100100
    101   if (!lpchText || cchText == 0 || cchText < -1 || !lprc == NULL)
     101  if ((!lpchText) || (cchText == 0) || (cchText < -1) || (!lprc == NULL))
    102102  {
    103103    SetLastError(ERROR_INVALID_PARAMETER);
     
    138138      bTopBottomIsOkay = TRUE;
    139139
    140     if (lprc->left >= lprc->right || !bTopBottomIsOkay)
     140    if ((lprc->left >= lprc->right) || !bTopBottomIsOkay)
    141141    {
    142142      TEXTMETRICA txtMetrics;
     
    260260  BOOL done = FALSE;
    261261
    262   if (dwDTFormat & DT_END_ELLIPSIS && cchText > 1)
     262  if ((dwDTFormat & DT_END_ELLIPSIS) && (cchText > 1))
    263263  {
    264264    int textWidth,width;
     
    269269    width = rectPtr->right-rectPtr->left;
    270270    textWidth = rect.right-rect.left;
    271     if (textWidth > width && width > 0)
     271    if ((textWidth > width) && (width > 0))
    272272    {
    273273      char* newText;
     
    292292      done = TRUE;
    293293    }
    294   } else if (dwDTFormat & DT_PATH_ELLIPSIS && cchText > 1)
     294  } else if ((dwDTFormat & DT_PATH_ELLIPSIS) && (cchText > 1))
    295295  {
    296296    int textWidth,width;
     
    303303    width = rectPtr->right-rectPtr->left;
    304304    textWidth = rect.right-rect.left;
    305     if (textWidth > width && width > 0)
     305    if ((textWidth > width) && (width > 0))
    306306    {
    307307      char *newText,*slashPos;
     
    346346            OSLibWinDrawTabbedText(pHps,newTextLen,lTabs,newText,&rect,0,0,flCmd | DTOS_QUERYEXTENT);
    347347            textWidth = rect.right-rect.left;
    348             if (textWidth <= width || endLen == 0) break;
     348            if ((textWidth <= width) || (endLen == 0)) break;
    349349          } while (TRUE);
    350350        }
     
    363363          OSLibWinDrawTabbedText(pHps,newTextLen,lTabs,newText,&rect,0,0,flCmd | DTOS_QUERYEXTENT);
    364364          textWidth = rect.right-rect.left;
    365           if (textWidth <= width || preLen+endLen == 0) break;
     365          if ((textWidth <= width) || (preLen+endLen == 0)) break;
    366366          if (endLen > preLen)
    367367          {
     
    433433  POINTLOS2 widthHeight = {0,0};
    434434
    435   if (!pHps || nCount == 0 || nTabPositions < 0)
     435  if (!pHps || (nCount == 0) || (nTabPositions < 0))
    436436    return 0;
    437437
     
    441441    return 0;
    442442  }
    443   if (lpString == NULL || nCount >  512 || (nTabPositions > 0 && lpnTabStopPositions == NULL))
     443  if ((lpString == NULL) || (nCount >  512) || ((nTabPositions > 0) && (lpnTabStopPositions == NULL)))
    444444  {
    445445    SetLastError(ERROR_INVALID_PARAMETER);
     
    488488  DWORD dimensions;
    489489
    490   if (pHps == NULL || lpString == NULL)
     490  if ((pHps == NULL) || (lpString == NULL))
    491491  {
    492492    SetLastError(ERROR_INVALID_HANDLE);
     
    563563  LONG hits;
    564564
    565   if (!pHps || cbCount < 0 || (lpszString == NULL && cbCount != 0))
     565  if (!pHps || (cbCount < 0) || ((lpszString == NULL) && (cbCount != 0)))
    566566  {
    567567    SetLastError(ERROR_INVALID_HANDLE);
     
    637637  }
    638638
    639   if (lprc && (align & 0x18) == TA_BASELINE)
     639  if (lprc && ((align & 0x18) == TA_BASELINE))
    640640  {
    641641    //CB: if TA_BASELINE is set, GPI doesn't fill rect
     
    649649  hits = OSLibGpiCharStringPosAt(pHps,&ptl,&pmRect,flOptions,cbCount,lpszString,lpDx);
    650650
    651   if (lprc && (align & 0x18) == TA_BASELINE)
     651  if (lprc && ((align & 0x18) == TA_BASELINE))
    652652    OSLibGpiSetTextAlignment(pHps,pmHAlign,pmVAlign);
    653653
  • trunk/src/user32/button.cpp

    r2204 r2221  
    1 /* $Id: button.cpp,v 1.25 1999-12-26 17:30:14 cbratschi Exp $ */
     1/* $Id: button.cpp,v 1.26 1999-12-27 22:53:51 cbratschi Exp $ */
    22/* File: button.cpp -- Button type widgets
    33 *
     
    466466  DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE),newStyle;
    467467
    468   if ((wParam & 0x0f) >= MAX_BTN_TYPE) return 0;
    469   newStyle = (dwStyle & 0xfffffff0) | (wParam & 0x0000000f);
     468  if ((wParam & 0x0F) >= MAX_BTN_TYPE) return 0;
     469  newStyle = (dwStyle & 0xFFFFFFF0) | (wParam & 0x0000000F);
    470470
    471471  if (newStyle != dwStyle)
    472472  {
    473473    SetWindowLongA(hwnd,GWL_STYLE,newStyle);
    474     PAINT_BUTTON(hwnd,newStyle & 0x0f,ODA_DRAWENTIRE);
     474    PAINT_BUTTON(hwnd,newStyle & 0x0F,ODA_DRAWENTIRE);
    475475  }
    476476
  • trunk/src/user32/edit.cpp

    r2211 r2221  
    1 /* $Id: edit.cpp,v 1.26 1999-12-27 17:08:07 cbratschi Exp $ */
     1/* $Id: edit.cpp,v 1.27 1999-12-27 22:53:52 cbratschi Exp $ */
    22/*
    33 *      Edit control
     
    19381938        INT i;
    19391939
    1940         if (!lpch || *(WORD*)lpch == 0) return 0;
     1940        if (!lpch || (*(WORD*)lpch == 0)) return 0;
    19411941
    19421942        if (es->style & ES_MULTILINE) {
     
    23302330        if (strl)
    23312331        {
    2332           if (es->style & ES_NUMBER && !EDIT_CheckNumber((CHAR*)lpsz_replace))
     2332          if ((es->style & ES_NUMBER) && !EDIT_CheckNumber((CHAR*)lpsz_replace))
    23332333            MessageBeep(MB_ICONEXCLAMATION);
    23342334          else
     
    25352535        EDIT_LockBuffer(hwnd, es);
    25362536
    2537         if (es->text && es->text[0] != 0)
     2537        if (es->text && (es->text[0] != 0))
    25382538        {
    25392539          if (es->style & ES_NUMBER)
     
    26232623        //TRACE_(edit)("left=%d, right=%d\n", es->left_margin, es->right_margin);
    26242624
    2625         if (oldLeft != es->left_margin || oldRight != es->right_margin)
     2625        if ((oldLeft != es->left_margin) || (oldRight != es->right_margin))
    26262626        {
    26272627          GetClientRect(hwnd, &r);
     
    27382738        ORDER_UINT(start, old_start);
    27392739        ORDER_UINT(old_start, old_end);
    2740         if (start == old_start && end == old_end) return;
     2740        if ((start == old_start) && (end == old_end)) return;
    27412741        if (end != old_start)
    27422742        {
     
    28952895                  if (es->style & ES_NUMBER)
    28962896                  {
    2897                     if ((BYTE)c < '0' || (BYTE)c > '9') MessageBeep(MB_ICONEXCLAMATION);
     2897                    if (((BYTE)c < '0') || ((BYTE)c > '9')) MessageBeep(MB_ICONEXCLAMATION);
    28982898                    return;
    28992899                  }
     
    39183918                        EDIT_EM_Undo(hwnd, es);
    39193919                return 0;
    3920         } else if (key == VK_UP || key == VK_DOWN)
     3920        } else if ((key == VK_UP) || (key == VK_DOWN))
    39213921                if (EDIT_CheckCombo(hwnd, WM_SYSKEYDOWN, key, key_data))
    39223922                        return 0;
  • trunk/src/user32/oslibgdi.cpp

    r1849 r2221  
    1 /* $Id: oslibgdi.cpp,v 1.4 1999-11-26 17:06:07 cbratschi Exp $ */
     1/* $Id: oslibgdi.cpp,v 1.5 1999-12-27 22:53:52 cbratschi Exp $ */
    22/*
    33 * Window GDI wrapper functions for OS/2
     
    1616#include <stdlib.h>
    1717#include <string.h>
    18 
    1918#include <misc.h>
    2019#include <oslibgdi.h>
    2120#include <oslibwin.h>
     21
     22//CB: new mapping infrastructure to avoid transformation bugs -> available soon
     23
     24/*
     25All functions can be used to transform from Win32 to OS/2 and vice versa
     26First letter is lower case to avoid conflicts with Win32 API names
     27
     28Single y mapping:
     29 mapScreenY()
     30 mapWindowY()
     31
     32Single point mapping:
     33 mapScreenPoint()
     34 mapWindowPoint()
     35
     36Single rect mapping:
     37 mapScreenRect()
     38 mapWindowRect()
     39
     40Rect transformation:
     41 copyOS2Rect()
     42 copyWin32Rect()
     43*/
     44
     45INT mapScreenY(INT y)
     46{
     47  return WinQuerySysValue(HWND_DESKTOP,SV_CYSCREEN)-1-y;
     48}
     49//******************************************************************************
     50//******************************************************************************
     51INT mapScreenY(INT screenH,INT y)
     52{
     53  return screenH-1-y;
     54}
     55
    2256
    2357//******************************************************************************
  • trunk/src/user32/oslibwin.cpp

    r2211 r2221  
    1 /* $Id: oslibwin.cpp,v 1.53 1999-12-27 17:08:08 cbratschi Exp $ */
     1/* $Id: oslibwin.cpp,v 1.54 1999-12-27 22:53:53 cbratschi Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    109109
    110110        dwFrameStyle |= FCF_NOBYTEALIGN;
    111         if (hwndParent == HWND_DESKTOP && dwFrameStyle & FCF_TITLEBAR)
     111        if ((hwndParent == HWND_DESKTOP) && (dwFrameStyle & FCF_TITLEBAR))
    112112                dwFrameStyle |= FCF_TASKLIST | FCF_NOMOVEWITHOWNER;
    113113
  • trunk/src/user32/win32wbase.cpp

    r2211 r2221  
    1 /* $Id: win32wbase.cpp,v 1.121 1999-12-27 17:08:08 cbratschi Exp $ */
     1/* $Id: win32wbase.cpp,v 1.122 1999-12-27 22:53:53 cbratschi Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    362362
    363363  /* Fix the coordinates */
    364   if (cs->x == CW_USEDEFAULT || cs->x == CW_USEDEFAULT16)
     364  if ((cs->x == CW_USEDEFAULT) || (cs->x == CW_USEDEFAULT16))
    365365  {
    366366//        PDB *pdb = PROCESS_Current();
     
    382382        * the one that comes with Win95 and NT)
    383383        */
    384         if (cs->y != CW_USEDEFAULT && cs->y != CW_USEDEFAULT16) sw = cs->y;
     384        if ((cs->y != CW_USEDEFAULT) && (cs->y != CW_USEDEFAULT16)) sw = cs->y;
    385385
    386386        /* We have saved cs->y, now we can trash it */
     
    397397//        }
    398398  }
    399   if (cs->cx == CW_USEDEFAULT || cs->cx == CW_USEDEFAULT16)
     399  if ((cs->cx == CW_USEDEFAULT) || (cs->cx == CW_USEDEFAULT16))
    400400  {
    401401#if 0
     
    439439  {
    440440        SetParent(0);
    441         if (!cs->hwndParent || cs->hwndParent == windowDesktop->getWindowHandle()) {
     441        if (!cs->hwndParent || (cs->hwndParent == windowDesktop->getWindowHandle())) {
    442442            owner = NULL;
    443443        }
     
    784784    SendInternalMessageA(WM_NCDESTROY, 0, 0);
    785785
    786     if (hwndHorzScroll && OSLibWinQueryWindow(hwndHorzScroll,QWOS_PARENT) == OSLibWinQueryObjectWindow()) OSLibWinDestroyWindow(hwndHorzScroll);
    787     if (hwndVertScroll && OSLibWinQueryWindow(hwndVertScroll,QWOS_PARENT) == OSLibWinQueryObjectWindow()) OSLibWinDestroyWindow(hwndVertScroll);
     786    if (hwndHorzScroll && (OSLibWinQueryWindow(hwndHorzScroll,QWOS_PARENT) == OSLibWinQueryObjectWindow())) OSLibWinDestroyWindow(hwndHorzScroll);
     787    if (hwndVertScroll && (OSLibWinQueryWindow(hwndVertScroll,QWOS_PARENT) == OSLibWinQueryObjectWindow())) OSLibWinDestroyWindow(hwndVertScroll);
    788788
    789789    TIMER_KillTimerFromWindow(OS2Hwnd);
     
    991991
    992992        HWND hwndActive = GetActiveWindow();
    993         if (hwndTop && getWindowHandle() != hwndActive)
     993        if (hwndTop && (getWindowHandle() != hwndActive))
    994994        {
    995995                LONG ret = SendInternalMessageA(WM_MOUSEACTIVATE, hwndTop,
     
    13421342    UINT uCommand = wParam & 0xFFF0;
    13431343
    1344     if (getStyle() & WS_CHILD && uCommand != SC_KEYMENU )
     1344    if ((getStyle() & WS_CHILD) && (uCommand != SC_KEYMENU))
    13451345        ScreenToClient(getParent()->getWindowHandle(), pt32 );
    13461346
     
    22022202        window = GetWindowFromHandle(hwnd++);
    22032203        if(window) {
    2204             if (window->getStyle() & WS_POPUP || (window->getStyle() & WS_CAPTION) == WS_CAPTION)
     2204            if ((window->getStyle() & WS_POPUP) || ((window->getStyle() & WS_CAPTION) == WS_CAPTION))
    22052205            {
    22062206
     
    22282228        window = GetWindowFromHandle(hwnd++);
    22292229        if(window) {
    2230             if (window->getStyle() & WS_POPUP || (window->getStyle() & WS_CAPTION) == WS_CAPTION)
     2230            if ((window->getStyle() & WS_POPUP) || ((window->getStyle() & WS_CAPTION) == WS_CAPTION))
    22312231            {
    22322232
     
    30123012  if(IsWindowDestroyed()) return;
    30133013
    3014   //CB: todo: dwExStyle, creating new frame controls, destroy not used, WS_VISIBLE, ...
     3014  //CB: todo: dwExStyle, creating new frame controls, destroy not used controls, WS_VISIBLE, WS_CHILD, ...
    30153015  //    write test cases
    3016   if (dwStyle & 0xFFFF0000 != oldStyle & 0xFFFF0000)
     3016  if ((dwStyle & 0xFFFF0000) != (oldStyle & 0xFFFF0000))
     3017  {
     3018    //dprintf(("updateWindowStyle: %x %x",oldStyle,dwStyle));
    30173019    OSLibSetWindowStyle(OS2HwndFrame, dwStyle, fTaskList);
     3020  }
    30183021}
    30193022//******************************************************************************
     
    32713274        }
    32723275
    3273         if (!child || child->getParent() != this)
     3276        if (!child || (child->getParent() != this))
    32743277        {
    32753278            retvalue = 0;
     
    33393342        }
    33403343
    3341         if (!child || child->getParent() != this)
     3344        if (!child || (child->getParent() != this))
    33423345        {
    33433346            retvalue = 0;
     
    33683371    while (TRUE)
    33693372    {
    3370         if (!nextchild || nextchild->getStyle() & WS_GROUP)
     3373        if (!nextchild || (nextchild->getStyle() & WS_GROUP))
    33713374        {
    33723375            /* Wrap-around to the beginning of the group */
Note: See TracChangeset for help on using the changeset viewer.