Changeset 2221 for trunk/src/user32


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

* empty log message *

Location:
trunk/src/user32
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • 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.