Changeset 2221 for trunk/src/user32
- Timestamp:
- Dec 27, 1999, 11:54:49 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
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.