Ignore:
Timestamp:
Oct 22, 1999, 8:11:51 PM (26 years ago)
Author:
sandervl
Message:

Lots of changes/fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32wbase.cpp

    r1391 r1405  
    1 /* $Id: win32wbase.cpp,v 1.58 1999-10-21 12:19:28 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.59 1999-10-22 18:11:48 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    137137  fNoSizeMsg       = FALSE;
    138138  fIsDestroyed     = FALSE;
     139  fCreated         = FALSE;
    139140
    140141  windowNameA      = NULL;
     
    558559 POINT maxPos;
    559560 CREATESTRUCTA  *cs = tmpcs;  //pointer to CREATESTRUCT used in CreateWindowExA method
     561 RECT rectWndTmp, rectClientTmp;
    560562
    561563  OS2Hwnd      = hwndClient;
    562564  OS2HwndFrame = hwndFrame;
    563 //  if(!isFrameWindow())
    564 //        OS2HwndFrame = hwndClient;
     565
     566  //make backup copy of rectangles (some calls below result in WM_WINDOWPOSCHANGED with weird values since we haven't
     567  //set our window size just yet)
     568  rectWndTmp   = rectWindow;
     569  rectClientTmp = rectClient;
    565570
    566571  fNoSizeMsg = TRUE;
     
    621626  fakeWinBase.hwndThis     = OS2Hwnd;
    622627  fakeWinBase.pWindowClass = windowClass;
    623 //  SetFakeOpen32();
    624628
    625629  //Set icon from class
     
    649653  if (isChild()) FrameSetBorderSize(this,TRUE);
    650654
     655  //restore rectangles (some calls below result in WM_WINDOWPOSCHANGED with weird values since we haven't
     656  //set our window size just yet)
     657  rectWindow = rectWndTmp;
     658  rectClient = rectClientTmp;
     659
    651660  /* Send the WM_CREATE message
    652661   * Perhaps we shouldn't allow width/height changes as well.
     
    672681  if(SendMessageA(WM_NCCREATE, 0, (LPARAM)cs) )
    673682  {
     683        fCreated = TRUE;
     684
    674685        SendNCCalcSize(FALSE, &rectWindow, NULL, NULL, 0, &rectClient );
    675686
     
    15591570            return result;
    15601571    }
     1572    case WM_NOTIFY:
     1573        return 0; //comctl32 controls expect this
    15611574
    15621575    default:
     1576        if(Msg > WM_USER) {
     1577            return 0;
     1578        }
    15631579        return 1;
    15641580    }
     
    15931609 LRESULT rc;
    15941610 BOOL    fInternalMsgBackup = fInternalMsg;
     1611
     1612  //SvL: Some Wine controls send WM_COMMAND messages when they receive the focus -> apps don't like to
     1613  //     receive those before they get their WM_CREATE message
     1614  //NOTE: May need to refuse more messages
     1615  if(fCreated == FALSE && Msg == WM_COMMAND) {
     1616        dprintf(("SendMessageA BEFORE creation! %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam));
     1617        return 0;
     1618  }
    15951619
    15961620  if(Msg != WM_GETDLGCODE && Msg != WM_ENTERIDLE) {//sent *very* often
     
    16461670 LRESULT rc;
    16471671 BOOL    fInternalMsgBackup = fInternalMsg;
     1672
     1673  //SvL: Some Wine controls send WM_COMMAND messages when they receive the focus -> apps don't like to
     1674  //     receive those before they get their WM_CREATE message
     1675  //NOTE: May need to refuse more messages
     1676  if(fCreated == FALSE && Msg == WM_COMMAND) {
     1677        dprintf(("SendMessageA BEFORE creation! %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam));
     1678        return 0;
     1679  }
    16481680
    16491681  if(Msg != WM_GETDLGCODE && Msg != WM_ENTERIDLE) {//sent *very* often
Note: See TracChangeset for help on using the changeset viewer.