- Timestamp:
- Dec 27, 1999, 11:54:49 PM (26 years ago)
- Location:
- trunk/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/trackbar.c
r1762 r2221 1 /* $Id: trackbar.c,v 1.2 3 1999-11-17 17:06:23cbratschi Exp $ */1 /* $Id: trackbar.c,v 1.24 1999-12-27 22:54:49 cbratschi Exp $ */ 2 2 /* 3 3 * Trackbar control … … 95 95 for (i = 0;i < infoPtr->uNumTics;i++) 96 96 { 97 if ( infoPtr->tics[i] >= infoPtr->nRangeMin && infoPtr->tics[i] <= infoPtr->nRangeMax)97 if ((infoPtr->tics[i] >= infoPtr->nRangeMin) && (infoPtr->tics[i] <= infoPtr->nRangeMax)) 98 98 { 99 99 oldTics[count] = infoPtr->tics[i]; … … 109 109 } 110 110 111 if (infoPtr->uTicFreq && infoPtr->nRangeMax > infoPtr->nRangeMin&& (dwStyle & TBS_AUTOTICKS))111 if (infoPtr->uTicFreq && (infoPtr->nRangeMax > infoPtr->nRangeMin) && (dwStyle & TBS_AUTOTICKS)) 112 112 { 113 113 //Tics without start and end tic … … 191 191 channel->bottom = lpRect.bottom-CHANNEL_SPACE; 192 192 193 if ( dwStyle & TBS_BOTH || dwStyle & TBS_NOTICKS)193 if ((dwStyle & TBS_BOTH) || (dwStyle & TBS_NOTICKS)) 194 194 { //center 195 195 channel->left = (lpRect.right-channelSize)/2; … … 208 208 channel->left = lpRect.left+CHANNEL_SPACE; 209 209 channel->right = lpRect.right-CHANNEL_SPACE; 210 if ( dwStyle & TBS_BOTH || dwStyle & TBS_NOTICKS)210 if ((dwStyle & TBS_BOTH) || (dwStyle & TBS_NOTICKS)) 211 211 { //center 212 212 channel->top = (lpRect.bottom-channelSize)/2; … … 281 281 range = infoPtr->nRangeMax-infoPtr->nRangeMin; 282 282 283 if ( range <= 0 || selMin == selMax) SetRectEmpty(selection);283 if ((range <= 0) || (selMin == selMax)) SetRectEmpty(selection); 284 284 else 285 285 if (!(GetWindowLongA(hwnd, GWL_STYLE) & TBS_VERT)) … … 494 494 RECT thumb = infoPtr->rcThumb; 495 495 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)); 497 497 else hbr = CreateSolidBrush(GetSysColor(COLOR_3DFACE)); 498 498 hbrOld = SelectObject(hdc,hbr); … … 803 803 804 804 //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))) 806 806 { 807 807 //draw all pixels at once -> much faster … … 902 902 infoPtr->flags &= ~TB_DRAGPOSVALID; 903 903 } 904 if (!mustRedraw && infoPtr->nPos == lastPos) return;904 if (!mustRedraw && (infoPtr->nPos == lastPos)) return; 905 905 906 906 if (dwStyle & TBS_NOTHUMB) return; … … 931 931 if (dwStyle & TBS_VERT) 932 932 { 933 if ( lastRect.top > newRect.top && lastRect.top < newRect.bottom)933 if ((lastRect.top > newRect.top) && (lastRect.top < newRect.bottom)) 934 934 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)) 936 936 BitBlt(hdc,lastRect.left,lastRect.top,lastRect.right-lastRect.left,newRect.bottom-lastRect.top,hdcCompatible,lastRect.left,lastRect.top,SRCCOPY); 937 937 else … … 942 942 } else 943 943 { 944 if ( lastRect.right > newRect.left && lastRect.right < newRect.right)944 if ((lastRect.right > newRect.left) && (lastRect.right < newRect.right)) 945 945 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)) 947 947 BitBlt(hdc,newRect.left,newRect.top,lastRect.right-newRect.left,newRect.bottom-newRect.top,hdcCompatible,newRect.left,newRect.top,SRCCOPY); 948 948 else … … 1327 1327 newMax = x; 1328 1328 } 1329 if ( newMin == infoPtr->nRangeMin && newMax == infoPtr->nRangeMax) return 0;1329 if ((newMin == infoPtr->nRangeMin) && (newMax == infoPtr->nRangeMax)) return 0; 1330 1330 1331 1331 infoPtr->nRangeMin = newMin; … … 1454 1454 newMax = (INT)HIWORD(lParam); 1455 1455 1456 if ( infoPtr->nSelMin == newMin && infoPtr->nSelMax == newMax) return 0;1456 if ((infoPtr->nSelMin == newMin) && (infoPtr->nSelMax == newMax)) return 0; 1457 1457 infoPtr->nSelMin = newMin; 1458 1458 infoPtr->nSelMax = newMax; … … 1467 1467 if (!GetWindowLongA(hwnd, GWL_STYLE) & TBS_ENABLESELRANGE) return 0; 1468 1468 1469 if ( oldMin != newMin || oldMax != newMax)1469 if ((oldMin != newMin) || (oldMax != newMax)) 1470 1470 { 1471 1471 infoPtr->flags |= TB_SELECTIONCHANGED; … … 1613 1613 if (dwStyle & TBS_VERT) 1614 1614 { 1615 if ( wParam == TBTS_LEFT || wParam == TBTS_RIGHT) infoPtr->fLocation = (INT)wParam;1615 if ((wParam == TBTS_LEFT) || (wParam == TBTS_RIGHT)) infoPtr->fLocation = (INT)wParam; 1616 1616 } else 1617 1617 { 1618 if ( wParam == TBTS_TOP || wParam == TBTS_BOTTOM) infoPtr->fLocation = (INT)wParam;1618 if ((wParam == TBTS_TOP) || (wParam == TBTS_BOTTOM)) infoPtr->fLocation = (INT)wParam; 1619 1619 } 1620 1620 … … 1815 1815 fullThumb = infoPtr->rcFullThumb; 1816 1816 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.right1817 (clickPoint.y >= thumb.top) && 1818 (clickPoint.y <= thumb.bottom) && 1819 (((dwStyle & TBS_BOTH) && 1820 (clickPoint.x >= thumb.left) && 1821 (clickPoint.x <= thumb.right) 1822 1822 ) || 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.y1823 ((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) 1829 1829 ) 1830 1830 ) … … 1832 1832 ) || 1833 1833 (!(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.y1834 (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) 1839 1839 ) 1840 1840 ) … … 1843 1843 ) || 1844 1844 (!vertical && 1845 clickPoint.x >= thumb.left&&1846 clickPoint.x <= thumb.right&&1847 (( dwStyle & TBS_BOTH&&1848 clickPoint.y >= thumb.top&&1849 clickPoint.y <= thumb.bottom1845 (clickPoint.x >= thumb.left) && 1846 (clickPoint.x <= thumb.right) && 1847 (((dwStyle & TBS_BOTH) && 1848 (clickPoint.y >= thumb.top) && 1849 (clickPoint.y <= thumb.bottom) 1850 1850 ) || 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.x1851 ((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) 1857 1857 ) 1858 1858 ) … … 1860 1860 ) || 1861 1861 (!(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.x1862 (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) 1867 1867 ) 1868 1868 ) -
trunk/src/gdi32/line.cpp
r2092 r2221 1 /* $Id: line.cpp,v 1. 2 1999-12-16 16:52:32cbratschi Exp $ */1 /* $Id: line.cpp,v 1.3 1999-12-27 22:52:39 cbratschi Exp $ */ 2 2 /* 3 3 * Line API's … … 19 19 VOID toWin32LineEnd(PPOINTLOS2 startPt,INT nXEnd,INT nYEnd,PPOINTLOS2 pt) 20 20 { 21 if ( startPt->x != nXEnd || startPt->y != nYEnd)21 if ((startPt->x != nXEnd) || (startPt->y != nYEnd)) 22 22 { 23 23 if (nXEnd == startPt->x) … … 51 51 if (!GetObjectA(GetCurrentObject(hdc,OBJ_PEN),sizeof(penInfo),(LPVOID)&penInfo)) return FALSE; 52 52 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)) 56 56 return FALSE; 57 57 … … 117 117 toWin32LineEnd(&oldPoint,nXEnd,nYEnd,&newPoint); 118 118 119 if ( oldPoint.x == newPoint.x && oldPoint.y == newPoint.y)119 if ((oldPoint.x == newPoint.x) && (oldPoint.y == newPoint.y)) 120 120 { 121 121 rc = drawSingleLinePoint(hdc,pHps,&newPoint); -
trunk/src/gdi32/text.cpp
r2092 r2221 1 /* $Id: text.cpp,v 1. 5 1999-12-16 16:52:33cbratschi Exp $ */1 /* $Id: text.cpp,v 1.6 1999-12-27 22:52:39 cbratschi Exp $ */ 2 2 3 3 /* … … 99 99 LONG lTabs,xLeft,yTop; 100 100 101 if ( !lpchText || cchText == 0 || cchText < -1 || !lprc == NULL)101 if ((!lpchText) || (cchText == 0) || (cchText < -1) || (!lprc == NULL)) 102 102 { 103 103 SetLastError(ERROR_INVALID_PARAMETER); … … 138 138 bTopBottomIsOkay = TRUE; 139 139 140 if ( lprc->left >= lprc->right|| !bTopBottomIsOkay)140 if ((lprc->left >= lprc->right) || !bTopBottomIsOkay) 141 141 { 142 142 TEXTMETRICA txtMetrics; … … 260 260 BOOL done = FALSE; 261 261 262 if ( dwDTFormat & DT_END_ELLIPSIS && cchText > 1)262 if ((dwDTFormat & DT_END_ELLIPSIS) && (cchText > 1)) 263 263 { 264 264 int textWidth,width; … … 269 269 width = rectPtr->right-rectPtr->left; 270 270 textWidth = rect.right-rect.left; 271 if ( textWidth > width && width > 0)271 if ((textWidth > width) && (width > 0)) 272 272 { 273 273 char* newText; … … 292 292 done = TRUE; 293 293 } 294 } else if ( dwDTFormat & DT_PATH_ELLIPSIS && cchText > 1)294 } else if ((dwDTFormat & DT_PATH_ELLIPSIS) && (cchText > 1)) 295 295 { 296 296 int textWidth,width; … … 303 303 width = rectPtr->right-rectPtr->left; 304 304 textWidth = rect.right-rect.left; 305 if ( textWidth > width && width > 0)305 if ((textWidth > width) && (width > 0)) 306 306 { 307 307 char *newText,*slashPos; … … 346 346 OSLibWinDrawTabbedText(pHps,newTextLen,lTabs,newText,&rect,0,0,flCmd | DTOS_QUERYEXTENT); 347 347 textWidth = rect.right-rect.left; 348 if ( textWidth <= width || endLen == 0) break;348 if ((textWidth <= width) || (endLen == 0)) break; 349 349 } while (TRUE); 350 350 } … … 363 363 OSLibWinDrawTabbedText(pHps,newTextLen,lTabs,newText,&rect,0,0,flCmd | DTOS_QUERYEXTENT); 364 364 textWidth = rect.right-rect.left; 365 if ( textWidth <= width || preLen+endLen == 0) break;365 if ((textWidth <= width) || (preLen+endLen == 0)) break; 366 366 if (endLen > preLen) 367 367 { … … 433 433 POINTLOS2 widthHeight = {0,0}; 434 434 435 if (!pHps || nCount == 0 || nTabPositions < 0)435 if (!pHps || (nCount == 0) || (nTabPositions < 0)) 436 436 return 0; 437 437 … … 441 441 return 0; 442 442 } 443 if ( lpString == NULL || nCount > 512 || (nTabPositions > 0 && lpnTabStopPositions == NULL))443 if ((lpString == NULL) || (nCount > 512) || ((nTabPositions > 0) && (lpnTabStopPositions == NULL))) 444 444 { 445 445 SetLastError(ERROR_INVALID_PARAMETER); … … 488 488 DWORD dimensions; 489 489 490 if ( pHps == NULL || lpString == NULL)490 if ((pHps == NULL) || (lpString == NULL)) 491 491 { 492 492 SetLastError(ERROR_INVALID_HANDLE); … … 563 563 LONG hits; 564 564 565 if (!pHps || cbCount < 0 || (lpszString == NULL && cbCount != 0))565 if (!pHps || (cbCount < 0) || ((lpszString == NULL) && (cbCount != 0))) 566 566 { 567 567 SetLastError(ERROR_INVALID_HANDLE); … … 637 637 } 638 638 639 if (lprc && ( align & 0x18) == TA_BASELINE)639 if (lprc && ((align & 0x18) == TA_BASELINE)) 640 640 { 641 641 //CB: if TA_BASELINE is set, GPI doesn't fill rect … … 649 649 hits = OSLibGpiCharStringPosAt(pHps,&ptl,&pmRect,flOptions,cbCount,lpszString,lpDx); 650 650 651 if (lprc && ( align & 0x18) == TA_BASELINE)651 if (lprc && ((align & 0x18) == TA_BASELINE)) 652 652 OSLibGpiSetTextAlignment(pHps,pmHAlign,pmVAlign); 653 653 -
trunk/src/user32/button.cpp
r2204 r2221 1 /* $Id: button.cpp,v 1.2 5 1999-12-26 17:30:14cbratschi Exp $ */1 /* $Id: button.cpp,v 1.26 1999-12-27 22:53:51 cbratschi Exp $ */ 2 2 /* File: button.cpp -- Button type widgets 3 3 * … … 466 466 DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE),newStyle; 467 467 468 if ((wParam & 0x0 f) >= MAX_BTN_TYPE) return 0;469 newStyle = (dwStyle & 0x fffffff0) | (wParam & 0x0000000f);468 if ((wParam & 0x0F) >= MAX_BTN_TYPE) return 0; 469 newStyle = (dwStyle & 0xFFFFFFF0) | (wParam & 0x0000000F); 470 470 471 471 if (newStyle != dwStyle) 472 472 { 473 473 SetWindowLongA(hwnd,GWL_STYLE,newStyle); 474 PAINT_BUTTON(hwnd,newStyle & 0x0 f,ODA_DRAWENTIRE);474 PAINT_BUTTON(hwnd,newStyle & 0x0F,ODA_DRAWENTIRE); 475 475 } 476 476 -
trunk/src/user32/edit.cpp
r2211 r2221 1 /* $Id: edit.cpp,v 1.2 6 1999-12-27 17:08:07cbratschi Exp $ */1 /* $Id: edit.cpp,v 1.27 1999-12-27 22:53:52 cbratschi Exp $ */ 2 2 /* 3 3 * Edit control … … 1938 1938 INT i; 1939 1939 1940 if (!lpch || *(WORD*)lpch == 0) return 0;1940 if (!lpch || (*(WORD*)lpch == 0)) return 0; 1941 1941 1942 1942 if (es->style & ES_MULTILINE) { … … 2330 2330 if (strl) 2331 2331 { 2332 if ( es->style & ES_NUMBER&& !EDIT_CheckNumber((CHAR*)lpsz_replace))2332 if ((es->style & ES_NUMBER) && !EDIT_CheckNumber((CHAR*)lpsz_replace)) 2333 2333 MessageBeep(MB_ICONEXCLAMATION); 2334 2334 else … … 2535 2535 EDIT_LockBuffer(hwnd, es); 2536 2536 2537 if (es->text && es->text[0] != 0)2537 if (es->text && (es->text[0] != 0)) 2538 2538 { 2539 2539 if (es->style & ES_NUMBER) … … 2623 2623 //TRACE_(edit)("left=%d, right=%d\n", es->left_margin, es->right_margin); 2624 2624 2625 if ( oldLeft != es->left_margin || oldRight != es->right_margin)2625 if ((oldLeft != es->left_margin) || (oldRight != es->right_margin)) 2626 2626 { 2627 2627 GetClientRect(hwnd, &r); … … 2738 2738 ORDER_UINT(start, old_start); 2739 2739 ORDER_UINT(old_start, old_end); 2740 if ( start == old_start && end == old_end) return;2740 if ((start == old_start) && (end == old_end)) return; 2741 2741 if (end != old_start) 2742 2742 { … … 2895 2895 if (es->style & ES_NUMBER) 2896 2896 { 2897 if (( BYTE)c < '0' || (BYTE)c > '9') MessageBeep(MB_ICONEXCLAMATION);2897 if (((BYTE)c < '0') || ((BYTE)c > '9')) MessageBeep(MB_ICONEXCLAMATION); 2898 2898 return; 2899 2899 } … … 3918 3918 EDIT_EM_Undo(hwnd, es); 3919 3919 return 0; 3920 } else if ( key == VK_UP || key == VK_DOWN)3920 } else if ((key == VK_UP) || (key == VK_DOWN)) 3921 3921 if (EDIT_CheckCombo(hwnd, WM_SYSKEYDOWN, key, key_data)) 3922 3922 return 0; -
trunk/src/user32/oslibgdi.cpp
r1849 r2221 1 /* $Id: oslibgdi.cpp,v 1. 4 1999-11-26 17:06:07cbratschi Exp $ */1 /* $Id: oslibgdi.cpp,v 1.5 1999-12-27 22:53:52 cbratschi Exp $ */ 2 2 /* 3 3 * Window GDI wrapper functions for OS/2 … … 16 16 #include <stdlib.h> 17 17 #include <string.h> 18 19 18 #include <misc.h> 20 19 #include <oslibgdi.h> 21 20 #include <oslibwin.h> 21 22 //CB: new mapping infrastructure to avoid transformation bugs -> available soon 23 24 /* 25 All functions can be used to transform from Win32 to OS/2 and vice versa 26 First letter is lower case to avoid conflicts with Win32 API names 27 28 Single y mapping: 29 mapScreenY() 30 mapWindowY() 31 32 Single point mapping: 33 mapScreenPoint() 34 mapWindowPoint() 35 36 Single rect mapping: 37 mapScreenRect() 38 mapWindowRect() 39 40 Rect transformation: 41 copyOS2Rect() 42 copyWin32Rect() 43 */ 44 45 INT mapScreenY(INT y) 46 { 47 return WinQuerySysValue(HWND_DESKTOP,SV_CYSCREEN)-1-y; 48 } 49 //****************************************************************************** 50 //****************************************************************************** 51 INT mapScreenY(INT screenH,INT y) 52 { 53 return screenH-1-y; 54 } 55 22 56 23 57 //****************************************************************************** -
trunk/src/user32/oslibwin.cpp
r2211 r2221 1 /* $Id: oslibwin.cpp,v 1.5 3 1999-12-27 17:08:08cbratschi Exp $ */1 /* $Id: oslibwin.cpp,v 1.54 1999-12-27 22:53:53 cbratschi Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 109 109 110 110 dwFrameStyle |= FCF_NOBYTEALIGN; 111 if ( hwndParent == HWND_DESKTOP && dwFrameStyle & FCF_TITLEBAR)111 if ((hwndParent == HWND_DESKTOP) && (dwFrameStyle & FCF_TITLEBAR)) 112 112 dwFrameStyle |= FCF_TASKLIST | FCF_NOMOVEWITHOWNER; 113 113 -
trunk/src/user32/win32wbase.cpp
r2211 r2221 1 /* $Id: win32wbase.cpp,v 1.12 1 1999-12-27 17:08:08cbratschi Exp $ */1 /* $Id: win32wbase.cpp,v 1.122 1999-12-27 22:53:53 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 362 362 363 363 /* Fix the coordinates */ 364 if ( cs->x == CW_USEDEFAULT || cs->x == CW_USEDEFAULT16)364 if ((cs->x == CW_USEDEFAULT) || (cs->x == CW_USEDEFAULT16)) 365 365 { 366 366 // PDB *pdb = PROCESS_Current(); … … 382 382 * the one that comes with Win95 and NT) 383 383 */ 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; 385 385 386 386 /* We have saved cs->y, now we can trash it */ … … 397 397 // } 398 398 } 399 if ( cs->cx == CW_USEDEFAULT || cs->cx == CW_USEDEFAULT16)399 if ((cs->cx == CW_USEDEFAULT) || (cs->cx == CW_USEDEFAULT16)) 400 400 { 401 401 #if 0 … … 439 439 { 440 440 SetParent(0); 441 if (!cs->hwndParent || cs->hwndParent == windowDesktop->getWindowHandle()) {441 if (!cs->hwndParent || (cs->hwndParent == windowDesktop->getWindowHandle())) { 442 442 owner = NULL; 443 443 } … … 784 784 SendInternalMessageA(WM_NCDESTROY, 0, 0); 785 785 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); 788 788 789 789 TIMER_KillTimerFromWindow(OS2Hwnd); … … 991 991 992 992 HWND hwndActive = GetActiveWindow(); 993 if (hwndTop && getWindowHandle() != hwndActive)993 if (hwndTop && (getWindowHandle() != hwndActive)) 994 994 { 995 995 LONG ret = SendInternalMessageA(WM_MOUSEACTIVATE, hwndTop, … … 1342 1342 UINT uCommand = wParam & 0xFFF0; 1343 1343 1344 if ( getStyle() & WS_CHILD && uCommand != SC_KEYMENU)1344 if ((getStyle() & WS_CHILD) && (uCommand != SC_KEYMENU)) 1345 1345 ScreenToClient(getParent()->getWindowHandle(), pt32 ); 1346 1346 … … 2202 2202 window = GetWindowFromHandle(hwnd++); 2203 2203 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)) 2205 2205 { 2206 2206 … … 2228 2228 window = GetWindowFromHandle(hwnd++); 2229 2229 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)) 2231 2231 { 2232 2232 … … 3012 3012 if(IsWindowDestroyed()) return; 3013 3013 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, ... 3015 3015 // write test cases 3016 if (dwStyle & 0xFFFF0000 != oldStyle & 0xFFFF0000) 3016 if ((dwStyle & 0xFFFF0000) != (oldStyle & 0xFFFF0000)) 3017 { 3018 //dprintf(("updateWindowStyle: %x %x",oldStyle,dwStyle)); 3017 3019 OSLibSetWindowStyle(OS2HwndFrame, dwStyle, fTaskList); 3020 } 3018 3021 } 3019 3022 //****************************************************************************** … … 3271 3274 } 3272 3275 3273 if (!child || child->getParent() != this)3276 if (!child || (child->getParent() != this)) 3274 3277 { 3275 3278 retvalue = 0; … … 3339 3342 } 3340 3343 3341 if (!child || child->getParent() != this)3344 if (!child || (child->getParent() != this)) 3342 3345 { 3343 3346 retvalue = 0; … … 3368 3371 while (TRUE) 3369 3372 { 3370 if (!nextchild || nextchild->getStyle() & WS_GROUP)3373 if (!nextchild || (nextchild->getStyle() & WS_GROUP)) 3371 3374 { 3372 3375 /* Wrap-around to the beginning of the group */
Note:
See TracChangeset
for help on using the changeset viewer.