Changeset 11773


Ignore:
Timestamp:
Oct 8, 1999, 2:10:27 PM (26 years ago)
Author:
cbratschi
Message:

resource and other fixes

Location:
tags/trunk/src/user32
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tags/trunk/src/user32/button.cpp

    r11582 r11773  
    1 /* $Id: button.cpp,v 1.3 1999-09-20 19:17:57 sandervl Exp $ */
     1/* $Id: button.cpp,v 1.4 1999-10-08 12:10:26 cbratschi Exp $ */
    22/* File: button.cpp -- Button type widgets
    33 *
     
    129129  {
    130130    BITMAP bmp;
    131 
    132     hbitmapCheckBoxes = NativeLoadBitmap(0,MAKEINTRESOURCEA(OBM_CHECKBOXES));
     131    HINSTANCE hinst;
     132
     133    //CB: Open32 hack to load our own bitmap
     134    hinst = LoadLibraryA("USER32.DLL");
     135    hbitmapCheckBoxes = NativeLoadBitmap(hinst,MAKEINTRESOURCEA(OBM_CHECKBOXES));
     136    FreeLibrary(hinst);
    133137    if (GetObjectA(hbitmapCheckBoxes,sizeof(bmp),&bmp))
    134138    {
     
    393397  GetClientRect(hwnd,&rect);
    394398  point = MAKELPARAM(rect.right/2,rect.bottom/2);
    395   SendMessageA(hwnd,WM_LBUTTONDOWN,0,point);
     399  SendMessageA(hwnd,WM_LBUTTONDOWN,MK_LBUTTON,point);
    396400  Sleep(100);
    397401  SendMessageA(hwnd,WM_LBUTTONUP,0,point);
     
    503507 *           ButtonWndProc
    504508 */
     509static
    505510LRESULT WINAPI ButtonWndProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
    506511{
     
    612617     */
    613618    BUTTON_DrawPushButton(hwnd,
    614                           hDC,
    615                           action,
    616                           bHighLighted);
     619                          hDC,
     620                          action,
     621                          bHighLighted);
    617622}
    618623
     
    649654    {
    650655        Rectangle(hDC, rc.left, rc.top, rc.right, rc.bottom);
    651         InflateRect( &rc, -1, -1 );
     656        InflateRect( &rc, -1, -1 );
    652657    }
    653658
     
    693698            /* don't write gray text on gray background */
    694699            PaintGrayOnGray( hDC,infoPtr->hFont,&rc,text,
    695                                DT_CENTER | DT_VCENTER );
     700                               DT_CENTER | DT_VCENTER );
    696701        else
    697702        {
     
    702707                         DT_SINGLELINE | DT_CENTER | DT_VCENTER );
    703708            /* do we have the focus?
    704              * Win9x draws focus last with a size prop. to the button
    705              */
     709             * Win9x draws focus last with a size prop. to the button
     710             */
    706711        }
    707712        free(text);
    708713    }
    709714    if ( ((dwStyle & BS_ICON) || (dwStyle & BS_BITMAP) ) &&
    710         (infoPtr->hImage != NULL) )
    711     {
    712         int yOffset, xOffset;
    713         int imageWidth, imageHeight;
    714 
    715         /*
    716         * We extract the size of the image from the handle.
    717         */
    718         if (dwStyle & BS_ICON)
    719         {
    720             ICONINFO iconInfo;
    721             BITMAP   bm;
    722 
    723             GetIconInfo((HICON)infoPtr->hImage, &iconInfo);
    724             GetObjectA (iconInfo.hbmColor, sizeof(BITMAP), &bm);
    725        
    726             imageWidth  = bm.bmWidth;
    727             imageHeight = bm.bmHeight;
     715        (infoPtr->hImage != NULL) )
     716    {
     717        int yOffset, xOffset;
     718        int imageWidth, imageHeight;
     719
     720        /*
     721        * We extract the size of the image from the handle.
     722        */
     723        if (dwStyle & BS_ICON)
     724        {
     725            ICONINFO iconInfo;
     726            BITMAP   bm;
     727
     728            GetIconInfo((HICON)infoPtr->hImage, &iconInfo);
     729            GetObjectA (iconInfo.hbmColor, sizeof(BITMAP), &bm);
     730
     731            imageWidth  = bm.bmWidth;
     732            imageHeight = bm.bmHeight;
    728733
    729734            DeleteObject(iconInfo.hbmColor);
    730735            DeleteObject(iconInfo.hbmMask);
    731736
    732         }
    733         else
    734         {
    735             BITMAP   bm;
    736 
    737             GetObjectA (infoPtr->hImage, sizeof(BITMAP), &bm);
    738        
    739             imageWidth  = bm.bmWidth;
    740             imageHeight = bm.bmHeight;
    741         }
    742 
    743         /* Center the bitmap */
    744         xOffset = (((rc.right - rc.left) - 2*xBorderOffset) - imageWidth ) / 2;
    745         yOffset = (((rc.bottom - rc.top) - 2*yBorderOffset) - imageHeight) / 2;
    746 
    747         /* If the image is too big for the button then create a region*/
     737        }
     738        else
     739        {
     740            BITMAP   bm;
     741
     742            GetObjectA (infoPtr->hImage, sizeof(BITMAP), &bm);
     743
     744            imageWidth  = bm.bmWidth;
     745            imageHeight = bm.bmHeight;
     746        }
     747
     748        /* Center the bitmap */
     749        xOffset = (((rc.right - rc.left) - 2*xBorderOffset) - imageWidth ) / 2;
     750        yOffset = (((rc.bottom - rc.top) - 2*yBorderOffset) - imageHeight) / 2;
     751
     752        /* If the image is too big for the button then create a region*/
    748753        if(xOffset < 0 || yOffset < 0)
    749         {
     754        {
    750755            HRGN hBitmapRgn = NULL;
    751756            hBitmapRgn = CreateRectRgn(
     
    754759            SelectClipRgn(hDC, hBitmapRgn);
    755760            DeleteObject(hBitmapRgn);
    756         }
    757 
    758         /* Let minimum 1 space from border */
    759         xOffset++, yOffset++;
    760 
    761         /*
    762         * Draw the image now.
    763         */
    764         if (dwStyle & BS_ICON)
    765         {
    766             DrawIcon(hDC,
     761        }
     762
     763        /* Let minimum 1 space from border */
     764        xOffset++, yOffset++;
     765
     766        /*
     767        * Draw the image now.
     768        */
     769        if (dwStyle & BS_ICON)
     770        {
     771            DrawIcon(hDC,
    767772                rc.left + xOffset, rc.top + yOffset,
    768                      (HICON)infoPtr->hImage);
    769         }
    770         else
     773                     (HICON)infoPtr->hImage);
     774        }
     775        else
    771776        {
    772             HDC hdcMem;
    773 
    774             hdcMem = CreateCompatibleDC (hDC);
    775             SelectObject (hdcMem, (HBITMAP)infoPtr->hImage);
    776             BitBlt(hDC,
    777                    rc.left + xOffset,
    778                    rc.top + yOffset,
    779                    imageWidth, imageHeight,
    780                    hdcMem, 0, 0, SRCCOPY);
    781        
    782             DeleteDC (hdcMem);
    783         }
     777            HDC hdcMem;
     778
     779            hdcMem = CreateCompatibleDC (hDC);
     780            SelectObject (hdcMem, (HBITMAP)infoPtr->hImage);
     781            BitBlt(hDC,
     782                   rc.left + xOffset,
     783                   rc.top + yOffset,
     784                   imageWidth, imageHeight,
     785                   hdcMem, 0, 0, SRCCOPY);
     786
     787            DeleteDC (hdcMem);
     788        }
    784789
    785790        if(xOffset < 0 || yOffset < 0)
     
    875880    {
    876881        BOOL bHighLighted = ((infoPtr->state & BUTTON_HIGHLIGHTED) ||
    877                              (infoPtr->state & BUTTON_CHECKED));
     882                             (infoPtr->state & BUTTON_CHECKED));
    878883
    879884        BUTTON_DrawPushButton(hwnd,
    880                               hDC,
    881                               action,
    882                               bHighLighted);
    883         return;
     885                              hDC,
     886                              action,
     887                              bHighLighted);
     888        return;
    884889    }
    885890
  • TabularUnified tags/trunk/src/user32/combo.cpp

    r11685 r11773  
    1 /* $Id: combo.cpp,v 1.2 1999-10-01 10:15:22 sandervl Exp $ */
     1/* $Id: combo.cpp,v 1.3 1999-10-08 12:10:26 cbratschi Exp $ */
    22/*
    33 * Combo controls
     
    5858  if(hDC)
    5959  {
    60     BOOL        bRet = FALSE;
     60    BOOL      bRet = FALSE;
     61    HINSTANCE hinst;
     62
     63    //CB: Open32 hack to load our own bitmap
     64    hinst = LoadLibraryA("USER32.DLL");
    6165    hComboBmp = NativeLoadBitmap(0,MAKEINTRESOURCEA(OBM_COMBO));
     66    FreeLibrary(hinst);
    6267    if(hComboBmp)
    6368    {
     
    532537        lbeStyle |= LBS_DISABLENOSCROLL;
    533538
    534       if( CB_GETTYPE(lphc) == CBS_SIMPLE )      /* child listbox */
     539      if( CB_GETTYPE(lphc) == CBS_SIMPLE )      /* child listbox */
    535540      {
    536         lbeStyle |= WS_CHILD | WS_VISIBLE;
    537 
    538         /*
    539         * In win 95 look n feel, the listbox in the simple combobox has
    540         * the WS_EXCLIENTEDGE style instead of the WS_BORDER style.
    541         */
     541        lbeStyle |= WS_CHILD | WS_VISIBLE;
     542
     543        /*
     544        * In win 95 look n feel, the listbox in the simple combobox has
     545        * the WS_EXCLIENTEDGE style instead of the WS_BORDER style.
     546        */
    542547        lbeStyle   &= ~WS_BORDER;
    543548        lbeExStyle |= WS_EX_CLIENTEDGE;
    544549      }
    545       else                                      /* popup listbox */
    546         lbeStyle |= WS_POPUP;
     550      else                                      /* popup listbox */
     551        lbeStyle |= WS_POPUP;
    547552
    548553     /* Dropdown ComboLBox is not a child window and we cannot pass
     
    11321137
    11331138   SetWindowPos( lphc->hWndLBox, HWND_TOP, rect.left, rect.bottom,
    1134                 lphc->droppedRect.right - lphc->droppedRect.left,
     1139                lphc->droppedRect.right - lphc->droppedRect.left,
    11351140                 nDroppedHeight,
    1136                 SWP_NOACTIVATE | SWP_NOREDRAW);
     1141                SWP_NOACTIVATE | SWP_NOREDRAW);
    11371142
    11381143
     
    11641169           RECT rect;
    11651170
    1166            /*
    1167             * It seems useful to send the WM_LBUTTONUP with (-1,-1) when cancelling
    1168             * and with (0,0) (anywhere in the listbox) when Oking.
    1169             */
    1170            SendMessageA( lphc->hWndLBox, WM_LBUTTONUP, 0, ok ? (LPARAM)0 : (LPARAM)(-1) );
     1171           /*
     1172            * It seems useful to send the WM_LBUTTONUP with (-1,-1) when cancelling
     1173            * and with (0,0) (anywhere in the listbox) when Oking.
     1174            */
     1175           SendMessageA( lphc->hWndLBox, WM_LBUTTONUP, 0, ok ? (LPARAM)0 : (LPARAM)(-1) );
    11711176
    11721177           lphc->wState &= ~CBF_DROPPED;
  • TabularUnified tags/trunk/src/user32/oslibwin.cpp

    r11765 r11773  
    1 /* $Id: oslibwin.cpp,v 1.14 1999-10-07 23:21:30 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.15 1999-10-08 12:10:27 cbratschi Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    2626#include "oslibgdi.h"
    2727#include "pmwindow.h"
     28
     29#define HAS_3DFRAME(exStyle) \
     30    ((exStyle & WS_EX_CLIENTEDGE_W) || (exStyle & WS_EX_STATICEDGE_W) || (exStyle & WS_EX_WINDOWEDGE_W))
    2831
    2932//******************************************************************************
     
    115118  if (dwStyle & WS_CHILD_W)
    116119  {
     120    if (dwStyle & WS_BORDER_W ||
     121        dwStyle & WS_DLGFRAME_W ||
     122        dwStyle & WS_THICKFRAME_W)
     123          if (!HAS_3DFRAME(*OSFrameStyle)) *OSFrameStyle |= WS_EX_WINDOWEDGE_W;
     124
    117125    if (dwExStyle & WS_EX_CLIENTEDGE_W ||
    118126        dwExStyle & WS_EX_STATICEDGE_W ||
     
    688696
    689697   if(scrollBar == OSLIB_VSCROLL) {
    690         hwndScroll = WinWindowFromID(hwndParent, FID_VERTSCROLL);
     698        hwndScroll = WinWindowFromID(hwndParent, FID_VERTSCROLL);
    691699   }
    692700   else hwndScroll = WinWindowFromID(hwndParent, FID_HORZSCROLL);
    693701
    694702   if(hwndScroll == NULL)
    695         return FALSE;
     703        return FALSE;
    696704
    697705   return WinEnableWindow(hwndScroll, fEnable);
     
    702710{
    703711   if(hwndScroll == NULL) {
    704         dprintf(("OSLibWinShowScrollBar: scrollbar %d (parent %x) not found!", scrollBar, hwndParent));
    705         return FALSE;
     712        dprintf(("OSLibWinShowScrollBar: scrollbar %d (parent %x) not found!", scrollBar, hwndParent));
     713        return FALSE;
    706714   }
    707715
    708    if(fShow != WinIsWindowVisible(hwndScroll)) 
     716   if(fShow != WinIsWindowVisible(hwndScroll))
    709717   {
    710718         WinSetParent(hwndScroll, fShow ? hwndParent : HWND_OBJECT, FALSE);
    711719         WinSendMsg(hwndParent, WM_UPDATEFRAME,
    712                     MPFROMLONG( ( scrollBar == OSLIB_VSCROLL ) ? FCF_VERTSCROLL 
    713                                                                : FCF_HORZSCROLL),
     720                    MPFROMLONG( ( scrollBar == OSLIB_VSCROLL ) ? FCF_VERTSCROLL
     721                                                               : FCF_HORZSCROLL),
    714722                    MPVOID );
    715723
    716         WinShowWindow(hwndScroll, fShow);
     724        WinShowWindow(hwndScroll, fShow);
    717725   }
    718    return TRUE;   
     726   return TRUE;
    719727}
    720728//******************************************************************************
     
    723731{
    724732   if(scrollBar == OSLIB_VSCROLL) {
    725         return WinWindowFromID(hwndParent, FID_VERTSCROLL);
     733        return WinWindowFromID(hwndParent, FID_VERTSCROLL);
    726734   }
    727735   else return WinWindowFromID(hwndParent, FID_HORZSCROLL);
     
    732740{
    733741   if(hwndScroll == NULL)
    734         return 0;
     742        return 0;
    735743
    736744   return (ULONG)WinSendMsg(hwndScroll, SBM_QUERYPOS, 0, 0);
     
    743751
    744752   if(hwndScroll == NULL)
    745         return 0;
     753        return 0;
    746754
    747755   oldPos = (ULONG)WinSendMsg(hwndScroll, SBM_QUERYPOS, 0, 0);
    748756
    749757   if(WinSendMsg(hwndScroll, SBM_SETPOS, MPFROMSHORT(pos), MPFROMLONG(fRedraw)) == FALSE)
    750         return 0;
     758        return 0;
    751759
    752760   return oldPos;
     
    754762//******************************************************************************
    755763//******************************************************************************
    756 BOOL OSLibWinSetScrollRange(HWND hwndParent, HWND hwndScroll, int minpos, 
     764BOOL OSLibWinSetScrollRange(HWND hwndParent, HWND hwndScroll, int minpos,
    757765                            int maxpos, int fRedraw)
    758766{
    759767   if(hwndScroll == NULL)
    760         return 0;
     768        return 0;
    761769
    762770   return (BOOL)WinSendMsg( hwndScroll, SBM_SETSCROLLBAR,
     
    766774//******************************************************************************
    767775//******************************************************************************
    768 BOOL OSLibWinSetScrollPageSize(HWND hwndParent, HWND hwndScroll, int pagesize, 
     776BOOL OSLibWinSetScrollPageSize(HWND hwndParent, HWND hwndScroll, int pagesize,
    769777                               int totalsize, int fRedraw)
    770778{
    771779   if(hwndScroll == NULL)
    772         return 0;
     780        return 0;
    773781
    774782   return (BOOL)WinSendMsg( hwndScroll, SBM_SETTHUMBSIZE,
  • TabularUnified tags/trunk/src/user32/scroll.cpp

    r11748 r11773  
    1 /* $Id: scroll.cpp,v 1.5 1999-10-07 09:28:01 sandervl Exp $ */
     1/* $Id: scroll.cpp,v 1.6 1999-10-08 12:10:27 cbratschi Exp $ */
    22/*
    33 * Scrollbar control
     
    109109static void SCROLL_LoadBitmaps(void)
    110110{
    111     hUpArrow  = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_UPARROW) );
    112     hDnArrow  = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_DNARROW) );
    113     hLfArrow  = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_LFARROW) );
    114     hRgArrow  = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_RGARROW) );
    115     hUpArrowD = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_UPARROWD) );
    116     hDnArrowD = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_DNARROWD) );
    117     hLfArrowD = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_LFARROWD) );
    118     hRgArrowD = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_RGARROWD) );
    119     hUpArrowI = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_UPARROWI) );
    120     hDnArrowI = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_DNARROWI) );
    121     hLfArrowI = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_LFARROWI) );
    122     hRgArrowI = LoadBitmapA( 0, MAKEINTRESOURCEA(OBM_RGARROWI) );
     111    HINSTANCE hinst;
     112
     113    //CB: Open32 hack to load our own bitmap
     114    hinst = LoadLibraryA("USER32.DLL");
     115    hUpArrow  = NativeLoadBitmap( hinst, MAKEINTRESOURCEA(OBM_UPARROW) );
     116    hDnArrow  = NativeLoadBitmap( hinst, MAKEINTRESOURCEA(OBM_DNARROW) );
     117    hLfArrow  = NativeLoadBitmap( hinst, MAKEINTRESOURCEA(OBM_LFARROW) );
     118    hRgArrow  = NativeLoadBitmap( hinst, MAKEINTRESOURCEA(OBM_RGARROW) );
     119    hUpArrowD = NativeLoadBitmap( hinst, MAKEINTRESOURCEA(OBM_UPARROWD) );
     120    hDnArrowD = NativeLoadBitmap( hinst, MAKEINTRESOURCEA(OBM_DNARROWD) );
     121    hLfArrowD = NativeLoadBitmap( hinst, MAKEINTRESOURCEA(OBM_LFARROWD) );
     122    hRgArrowD = NativeLoadBitmap( hinst, MAKEINTRESOURCEA(OBM_RGARROWD) );
     123    hUpArrowI = NativeLoadBitmap( hinst, MAKEINTRESOURCEA(OBM_UPARROWI) );
     124    hDnArrowI = NativeLoadBitmap( hinst, MAKEINTRESOURCEA(OBM_DNARROWI) );
     125    hLfArrowI = NativeLoadBitmap( hinst, MAKEINTRESOURCEA(OBM_LFARROWI) );
     126    hRgArrowI = NativeLoadBitmap( hinst, MAKEINTRESOURCEA(OBM_RGARROWI) );
     127    FreeLibrary(hinst);
    123128}
    124129
     
    15541559
    15551560        if(nBar == SB_HORZ || nBar == SB_BOTH)
    1556             rc = OSLibWinShowScrollBar(window->getOS2FrameWindowHandle(), 
    1557                                        window->getHorzScrollHandle(), 
     1561            rc = OSLibWinShowScrollBar(window->getOS2FrameWindowHandle(),
     1562                                       window->getHorzScrollHandle(),
    15581563                                       OSLIB_HSCROLL, fShow);
    15591564
    15601565        if(nBar == SB_VERT || ( rc == TRUE && nBar == SB_BOTH))
    15611566            rc = OSLibWinShowScrollBar(window->getOS2FrameWindowHandle(),
    1562                                        window->getVertScrollHandle(), 
     1567                                       window->getVertScrollHandle(),
    15631568                                       OSLIB_VSCROLL, fShow);
    15641569
  • TabularUnified tags/trunk/src/user32/win32wbase.cpp

    r11765 r11773  
    1 /* $Id: win32wbase.cpp,v 1.27 1999-10-07 23:21:31 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.28 1999-10-08 12:10:27 cbratschi Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    482482  if (cs->style & WS_HSCROLL)
    483483  {
    484         hwndHorzScroll = OSLibWinQueryScrollBarHandle(OS2HwndFrame, OSLIB_HSCROLL);
     484        hwndHorzScroll = OSLibWinQueryScrollBarHandle(OS2HwndFrame, OSLIB_HSCROLL);
    485485  }
    486486
    487487  if (cs->style & WS_VSCROLL) {
    488         hwndVertScroll = OSLibWinQueryScrollBarHandle(OS2HwndFrame, OSLIB_VSCROLL);
     488        hwndVertScroll = OSLibWinQueryScrollBarHandle(OS2HwndFrame, OSLIB_VSCROLL);
    489489  }
    490490
     
    507507  else
    508508  {
    509         setWindowId((DWORD)cs->hMenu);
     509        setWindowId((DWORD)cs->hMenu);
    510510  }
    511511
     
    13041304        }
    13051305        infoPtr = horzScrollInfo;
    1306         hwndScroll = hwndHorzScroll;
     1306        hwndScroll = hwndHorzScroll;
    13071307        scrollType = OSLIB_HSCROLL;
    13081308        break;
     
    13121312        }
    13131313        infoPtr = vertScrollInfo;
    1314         hwndScroll = hwndVertScroll;
     1314        hwndScroll = hwndVertScroll;
    13151315        scrollType = OSLIB_VSCROLL;
    13161316        break;
     
    14191419    {
    14201420    case WM_CLOSE:
    1421         DestroyWindow();
    1422         return 0;
     1421        DestroyWindow();
     1422        return 0;
    14231423
    14241424    case WM_GETTEXTLENGTH:
     
    14301430
    14311431    case WM_SETTEXT:
    1432         if(!fInternalMsg) {
    1433                 return SetWindowTextA((LPSTR)lParam);
    1434         }
    1435         else    return 0;
     1432        if(!fInternalMsg) {
     1433                return SetWindowTextA((LPSTR)lParam);
     1434        }
     1435        else    return 0;
    14361436
    14371437    case WM_SETREDRAW:
     
    15901590
    15911591    case WM_SETTEXT:
    1592         if(!fInternalMsg) {
    1593                 return SetWindowTextW((LPWSTR)lParam);
    1594         }
    1595         else    return 0;
     1592        if(!fInternalMsg) {
     1593                return SetWindowTextW((LPWSTR)lParam);
     1594        }
     1595        else    return 0;
    15961596
    15971597    default:
     
    16221622                        dprintf(("WM_CREATE returned -1\n"));
    16231623                        rc = -1; //don't create window
    1624                         break;
     1624                        break;
    16251625                }
    16261626                NotifyParent(Msg, wParam, lParam);
    16271627
    16281628                rc = 0;
    1629                 break;
     1629                break;
    16301630        }
    16311631        case WM_SETTEXT:
    16321632                rc = win32wndproc(getWindowHandle(), WM_SETTEXT, wParam, lParam);
    1633                 break;
     1633                break;
    16341634
    16351635        case WM_LBUTTONDOWN:
     
    16381638                NotifyParent(Msg, wParam, lParam);
    16391639                rc = win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    1640                 break;
     1640                break;
    16411641
    16421642        case WM_DESTROY:
    16431643                rc = win32wndproc(getWindowHandle(), WM_DESTROY, 0, 0);
    1644                 break;
     1644                break;
    16451645
    16461646        default:
    1647                 rc = win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    1648                 break;
     1647                rc = win32wndproc(getWindowHandle(), Msg, wParam, lParam);
     1648                break;
    16491649  }
    16501650  fInternalMsg = fInternalMsgBackup;
     
    16741674                        dprintf(("WM_CREATE returned -1\n"));
    16751675                        rc = -1; //don't create window
    1676                         break;
     1676                        break;
    16771677                }
    16781678                NotifyParent(Msg, wParam, lParam);
    16791679
    16801680                rc = 0;
    1681                 break;
     1681                break;
    16821682        }
    16831683        case WM_SETTEXT:
    16841684                rc = win32wndproc(getWindowHandle(), WM_SETTEXT, wParam, lParam);
    1685                 break;
     1685                break;
    16861686
    16871687        case WM_LBUTTONDOWN:
     
    16901690                NotifyParent(Msg, wParam, lParam);
    16911691                rc = win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    1692                 break;
     1692                break;
    16931693
    16941694        case WM_DESTROY:
     
    16961696                NotifyParent(Msg, wParam, lParam);
    16971697                rc = win32wndproc(getWindowHandle(), WM_DESTROY, 0, 0);
    1698                 break;
     1698                break;
    16991699
    17001700        default:
    1701                 rc = win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    1702                 break;
     1701                rc = win32wndproc(getWindowHandle(), Msg, wParam, lParam);
     1702                break;
    17031703  }
    17041704  fInternalMsg = fInternalMsgBackup;
     
    17271727                        dprintf(("WM_CREATE returned -1\n"));
    17281728                        rc = -1; //don't create window
    1729                         break;
     1729                        break;
    17301730                }
    17311731                NotifyParent(Msg, wParam, lParam);
    17321732                rc = 0;
    1733                 break;
     1733                break;
    17341734        }
    17351735        case WM_LBUTTONDOWN:
     
    17381738                NotifyParent(Msg, wParam, lParam);
    17391739                rc = win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    1740                 break;
     1740                break;
    17411741
    17421742        case WM_DESTROY:
     
    17441744                NotifyParent(Msg, wParam, lParam);
    17451745                rc = win32wndproc(getWindowHandle(), WM_DESTROY, 0, 0);
    1746                 break;
     1746                break;
    17471747        default:
    1748                 rc = win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    1749                 break;
     1748                rc = win32wndproc(getWindowHandle(), Msg, wParam, lParam);
     1749                break;
    17501750  }
    17511751  fInternalMsg = fInternalMsgBackup;
     
    17751775                        dprintf(("WM_CREATE returned -1\n"));
    17761776                        rc = -1; //don't create window
    1777                         break;
     1777                        break;
    17781778                }
    17791779                NotifyParent(Msg, wParam, lParam);
     
    17861786                NotifyParent(Msg, wParam, lParam);
    17871787                rc = win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    1788                 break;
     1788                break;
    17891789
    17901790        case WM_DESTROY:
     
    17921792                NotifyParent(Msg, wParam, lParam);
    17931793                rc = win32wndproc(getWindowHandle(), WM_DESTROY, 0, 0);
    1794                 break;
     1794                break;
    17951795        default:
    1796                 rc = win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    1797                 break;
     1796                rc = win32wndproc(getWindowHandle(), Msg, wParam, lParam);
     1797                break;
    17981798  }
    17991799  fInternalMsg = fInternalMsgBackup;
     
    23632363        return FALSE;
    23642364
    2365     if(windowNameA)     free(windowNameA);
    2366     if(windowNameW)     free(windowNameW);
     2365    if(windowNameA)     free(windowNameA);
     2366    if(windowNameW)     free(windowNameW);
    23672367
    23682368    windowNameA = (LPSTR)_smalloc(strlen(lpsz)+1);
     
    23842384        return FALSE;
    23852385
    2386     if(windowNameA)     free(windowNameA);
    2387     if(windowNameW)     free(windowNameW);
     2386    if(windowNameA)     free(windowNameA);
     2387    if(windowNameW)     free(windowNameW);
    23882388
    23892389    windowNameW = (LPWSTR)_smalloc((lstrlenW((LPWSTR)lpsz)+1)*sizeof(WCHAR));
     
    24062406   switch(index) {
    24072407        case GWL_EXSTYLE:
    2408                 oldval = dwExStyle;
    2409                 setExStyle(value);
    2410                 return oldval;
     2408                {
     2409                  STYLESTRUCT ss;
     2410
     2411                  ss.styleOld = dwExStyle;
     2412                  ss.styleNew = value;
     2413                  SendInternalMessageA(WM_STYLECHANGING,GWL_EXSTYLE,(LPARAM)&ss);
     2414                  oldval = dwExStyle;
     2415                  setExStyle(value);
     2416                  SendInternalMessageA(WM_STYLECHANGED,GWL_EXSTYLE,(LPARAM)&ss);
     2417                  return oldval;
     2418                }
    24112419        case GWL_STYLE:
    2412                 oldval = dwStyle;
    2413                 setStyle(value);
    2414                 OSLibSetWindowStyle(OS2HwndFrame, dwStyle);
    2415                 return oldval;
     2420                {
     2421                  STYLESTRUCT ss;
     2422
     2423                  ss.styleOld = dwStyle;
     2424                  ss.styleNew = value;
     2425                  SendInternalMessageA(WM_STYLECHANGING,GWL_STYLE,(LPARAM)&ss);
     2426                  oldval = dwStyle;
     2427                  setStyle(value);
     2428                  OSLibSetWindowStyle(OS2HwndFrame, dwStyle);
     2429                  SendInternalMessageA(WM_STYLECHANGED,GWL_STYLE,(LPARAM)&ss);
     2430                  return oldval;
     2431                }
    24162432        case GWL_WNDPROC:
    24172433                oldval = (LONG)getWindowProc();
Note: See TracChangeset for help on using the changeset viewer.