Changeset 140 for trunk/src


Ignore:
Timestamp:
Jun 21, 1999, 2:48:57 AM (26 years ago)
Author:
buerkle
Message:

* empty log message *

File:
1 edited

Legend:

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

    r134 r140  
    1 /* $Id: defwndproc.cpp,v 1.3 1999-06-20 16:47:39 sandervl Exp $ */
     1/* $Id: defwndproc.cpp,v 1.4 1999-06-21 00:48:57 buerkle Exp $ */
    22
    33/*
     
    2323    switch(Msg) {
    2424        case WM_SETREDRAW: //Open32 does not set the visible flag
    25         {
    26          long dwStyle = GetWindowLongA (hwnd, GWL_STYLE);
    27          if(wParam)
    28           SetWindowLongA (hwnd, GWL_STYLE, dwStyle | WS_VISIBLE);
    29          else
    30           SetWindowLongA (hwnd, GWL_STYLE, dwStyle & ~WS_VISIBLE);
    31          return O32_DefWindowProc(hwnd, Msg, wParam, lParam);
    32         }
     25                if(wParam)
     26                  SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE);
     27                else
     28                  SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE);
     29                return O32_DefWindowProc(hwnd, Msg, wParam, lParam);
    3330        case WM_NCCREATE://SvL: YAFMO (yet another feature missing in Open32)
    3431                return(TRUE);
     
    6158    switch(Msg) {
    6259        case WM_SETREDRAW: //Open32 does not set the visible flag
    63         {
    64          long dwStyle = GetWindowLongA (hwnd, GWL_STYLE);
    65          if(wParam)
    66           SetWindowLongA (hwnd, GWL_STYLE, dwStyle | WS_VISIBLE);
    67          else
    68           SetWindowLongA (hwnd, GWL_STYLE, dwStyle & ~WS_VISIBLE);
    69          return O32_DefWindowProc(hwnd, Msg, wParam, lParam);
    70         }
    71         case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
    72                 return(TRUE);
    73         case WM_CTLCOLORMSGBOX:
    74         case WM_CTLCOLOREDIT:
    75         case WM_CTLCOLORLISTBOX:
    76         case WM_CTLCOLORBTN:
    77         case WM_CTLCOLORDLG:
    78         case WM_CTLCOLORSTATIC:
    79         case WM_CTLCOLORSCROLLBAR:
    80                 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
    81                 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
    82                 return GetSysColorBrush(COLOR_BTNFACE);
    83 
    84         case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!!
    85                 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd));
    86                 return 0;
    87 
    88         default:
     60                if(wParam)
     61                  SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE);
     62                else
     63                  SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE);
    8964                return O32_DefWindowProc(hwnd, Msg, wParam, lParam);
     65        case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
     66                return(TRUE);
     67        case WM_CTLCOLORMSGBOX:
     68        case WM_CTLCOLOREDIT:
     69        case WM_CTLCOLORLISTBOX:
     70        case WM_CTLCOLORBTN:
     71        case WM_CTLCOLORDLG:
     72        case WM_CTLCOLORSTATIC:
     73        case WM_CTLCOLORSCROLLBAR:
     74                SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
     75                SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
     76                return GetSysColorBrush(COLOR_BTNFACE);
     77
     78        case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!!
     79                dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd));
     80                return 0;
     81
     82        default:
     83                return O32_DefWindowProc(hwnd, Msg, wParam, lParam);
    9084    }
    9185}
     
    9993    switch(Msg) {
    10094        case WM_SETREDRAW: //Open32 does not set the visible flag
    101         {
    102          long dwStyle = GetWindowLongA (hwnd, GWL_STYLE);
    103          if(wParam)
    104           SetWindowLongA (hwnd, GWL_STYLE, dwStyle | WS_VISIBLE);
    105          else
    106           SetWindowLongA (hwnd, GWL_STYLE, dwStyle & ~WS_VISIBLE);
    107          return O32_DefWindowProc(hwnd, Msg, wParam, lParam);
    108         }
    109         case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
    110                 return(TRUE);
    111         case WM_CTLCOLORMSGBOX:
    112         case WM_CTLCOLOREDIT:
    113         case WM_CTLCOLORLISTBOX:
    114         case WM_CTLCOLORBTN:
    115         case WM_CTLCOLORDLG:
    116         case WM_CTLCOLORSTATIC:
    117         case WM_CTLCOLORSCROLLBAR:
    118                 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
    119                 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
    120                 return GetSysColorBrush(COLOR_BTNFACE);
    121 
    122         case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!!
    123                 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd));
    124                 return 0;
    125 
    126         default:
     95                if(wParam)
     96                  SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE);
     97                else
     98                  SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE);
    12799                return O32_DefDlgProc(hwnd, Msg, wParam, lParam);
     100        case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
     101                return(TRUE);
     102        case WM_CTLCOLORMSGBOX:
     103        case WM_CTLCOLOREDIT:
     104        case WM_CTLCOLORLISTBOX:
     105        case WM_CTLCOLORBTN:
     106        case WM_CTLCOLORDLG:
     107        case WM_CTLCOLORSTATIC:
     108        case WM_CTLCOLORSCROLLBAR:
     109                SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
     110                SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
     111                return GetSysColorBrush(COLOR_BTNFACE);
     112
     113        case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!!
     114                dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd));
     115                return 0;
     116
     117        default:
     118                return O32_DefDlgProc(hwnd, Msg, wParam, lParam);
    128119    }
    129120}
     
    138129    switch(Msg) {
    139130        case WM_SETREDRAW: //Open32 does not set the visible flag
    140         {
    141          long dwStyle = GetWindowLongA (hwnd, GWL_STYLE);
    142          if(wParam)
    143           SetWindowLongA (hwnd, GWL_STYLE, dwStyle | WS_VISIBLE);
    144          else
    145           SetWindowLongA (hwnd, GWL_STYLE, dwStyle & ~WS_VISIBLE);
    146          return O32_DefWindowProc(hwnd, Msg, wParam, lParam);
    147         }
    148         case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
    149                 return(TRUE);
    150         case WM_CTLCOLORMSGBOX:
    151         case WM_CTLCOLOREDIT:
    152         case WM_CTLCOLORLISTBOX:
    153         case WM_CTLCOLORBTN:
    154         case WM_CTLCOLORDLG:
    155         case WM_CTLCOLORSTATIC:
    156         case WM_CTLCOLORSCROLLBAR:
    157                 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
    158                 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
    159                 return GetSysColorBrush(COLOR_BTNFACE);
    160 
    161         case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!!
    162                 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd));
    163                 return 0;
    164 
    165         default:
     131                if(wParam)
     132                  SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE);
     133                else
     134                  SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE);
    166135                return O32_DefDlgProc(hwnd, Msg, wParam, lParam);
     136        case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
     137                return(TRUE);
     138        case WM_CTLCOLORMSGBOX:
     139        case WM_CTLCOLOREDIT:
     140        case WM_CTLCOLORLISTBOX:
     141        case WM_CTLCOLORBTN:
     142        case WM_CTLCOLORDLG:
     143        case WM_CTLCOLORSTATIC:
     144        case WM_CTLCOLORSCROLLBAR:
     145                SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
     146                SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
     147                return GetSysColorBrush(COLOR_BTNFACE);
     148
     149        case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!!
     150                dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd));
     151                return 0;
     152
     153        default:
     154                return O32_DefDlgProc(hwnd, Msg, wParam, lParam);
    167155    }
    168156}
     
    176164    switch(Msg) {
    177165        case WM_SETREDRAW: //Open32 does not set the visible flag
    178         {
    179          //Frame
    180          long dwStyle = GetWindowLongA (hwndFrame, GWL_STYLE);
    181          if(wParam)
    182           SetWindowLongA (hwndFrame, GWL_STYLE, dwStyle | WS_VISIBLE);
    183          else
    184           SetWindowLongA (hwndFrame, GWL_STYLE, dwStyle & ~WS_VISIBLE);
    185          return O32_DefWindowProc(hwndFrame, Msg, wParam, lParam);
    186          //Client
    187          dwStyle = GetWindowLongA (hwndClient, GWL_STYLE);
    188          if(wParam)
    189           SetWindowLongA (hwndClient, GWL_STYLE, dwStyle | WS_VISIBLE);
    190          else
    191           SetWindowLongA (hwndClient, GWL_STYLE, dwStyle & ~WS_VISIBLE);
    192          return O32_DefWindowProc(hwndClient, Msg, wParam, lParam);
    193         }
     166                if(wParam)
     167                  SetWindowLongA (hwndClient, GWL_STYLE, GetWindowLongA (hwndClient, GWL_STYLE) | WS_VISIBLE);
     168                else
     169                  SetWindowLongA (hwndClient, GWL_STYLE, GetWindowLongA (hwndClient, GWL_STYLE) & ~WS_VISIBLE);
     170                return O32_DefFrameProc(hwndFrame, hwndClient, Msg, wParam, lParam);
    194171        case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
    195172                return(TRUE);
     
    223200    switch(Msg) {
    224201        case WM_SETREDRAW: //Open32 does not set the visible flag
    225         {
    226          //Frame
    227          long dwStyle = GetWindowLongA (hwndFrame, GWL_STYLE);
    228          if(wParam)
    229           SetWindowLongA (hwndFrame, GWL_STYLE, dwStyle | WS_VISIBLE);
    230          else
    231           SetWindowLongA (hwndFrame, GWL_STYLE, dwStyle & ~WS_VISIBLE);
    232          return O32_DefWindowProc(hwndFrame, Msg, wParam, lParam);
    233          //Client
    234          dwStyle = GetWindowLongA (hwndClient, GWL_STYLE);
    235          if(wParam)
    236           SetWindowLongA (hwndClient, GWL_STYLE, dwStyle | WS_VISIBLE);
    237          else
    238           SetWindowLongA (hwndClient, GWL_STYLE, dwStyle & ~WS_VISIBLE);
    239          return O32_DefWindowProc(hwndClient, Msg, wParam, lParam);
    240         }
     202                if(wParam)
     203                  SetWindowLongA (hwndClient, GWL_STYLE, GetWindowLongA (hwndClient, GWL_STYLE) | WS_VISIBLE);
     204                else
     205                  SetWindowLongA (hwndClient, GWL_STYLE, GetWindowLongA (hwndClient, GWL_STYLE) & ~WS_VISIBLE);
     206                return O32_DefFrameProc(hwndFrame, hwndClient, Msg, wParam, lParam);
    241207        case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
    242208                return(TRUE);
     
    269235    switch(Msg) {
    270236        case WM_SETREDRAW: //Open32 does not set the visible flag
    271         {
    272          long dwStyle = GetWindowLongA (hwnd, GWL_STYLE);
    273          if(wParam)
    274           SetWindowLongA (hwnd, GWL_STYLE, dwStyle | WS_VISIBLE);
    275          else
    276           SetWindowLongA (hwnd, GWL_STYLE, dwStyle & ~WS_VISIBLE);
    277          return O32_DefWindowProc(hwnd, Msg, wParam, lParam);
    278         }
    279         case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
    280                 return(TRUE);
    281         case WM_CTLCOLORMSGBOX:
    282         case WM_CTLCOLOREDIT:
    283         case WM_CTLCOLORLISTBOX:
    284         case WM_CTLCOLORBTN:
    285         case WM_CTLCOLORDLG:
    286         case WM_CTLCOLORSTATIC:
    287         case WM_CTLCOLORSCROLLBAR:
    288                 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
    289                 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
    290                 return GetSysColorBrush(COLOR_BTNFACE);
    291 
    292         case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!!
    293                 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd));
    294                 return 0;
    295 
    296         default:
     237                if(wParam)
     238                  SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE);
     239                else
     240                  SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE);
    297241                return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam);
     242        case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
     243                return(TRUE);
     244        case WM_CTLCOLORMSGBOX:
     245        case WM_CTLCOLOREDIT:
     246        case WM_CTLCOLORLISTBOX:
     247        case WM_CTLCOLORBTN:
     248        case WM_CTLCOLORDLG:
     249        case WM_CTLCOLORSTATIC:
     250        case WM_CTLCOLORSCROLLBAR:
     251                SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
     252                SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
     253                return GetSysColorBrush(COLOR_BTNFACE);
     254
     255        case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!!
     256                dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd));
     257                return 0;
     258
     259        default:
     260                return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam);
    298261    }
    299262}
     
    308271    switch(Msg) {
    309272        case WM_SETREDRAW: //Open32 does not set the visible flag
    310         {
    311          long dwStyle = GetWindowLongA (hwnd, GWL_STYLE);
    312          if(wParam)
    313           SetWindowLongA (hwnd, GWL_STYLE, dwStyle | WS_VISIBLE);
    314          else
    315           SetWindowLongA (hwnd, GWL_STYLE, dwStyle & ~WS_VISIBLE);
    316          return O32_DefWindowProc(hwnd, Msg, wParam, lParam);
    317         }
    318         case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
    319                 return(TRUE);
    320         case WM_CTLCOLORMSGBOX:
    321         case WM_CTLCOLOREDIT:
    322         case WM_CTLCOLORLISTBOX:
    323         case WM_CTLCOLORBTN:
    324         case WM_CTLCOLORDLG:
    325         case WM_CTLCOLORSTATIC:
    326         case WM_CTLCOLORSCROLLBAR:
    327                 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
    328                 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
    329                 return GetSysColorBrush(COLOR_BTNFACE);
    330 
    331         case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!!
    332                 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd));
    333                 return 0;
    334 
    335         default:
     273                if(wParam)
     274                  SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE);
     275                else
     276                  SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE);
    336277                return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam);
    337     }
    338 }
    339 //******************************************************************************
    340 //******************************************************************************
     278        case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)
     279                return(TRUE);
     280        case WM_CTLCOLORMSGBOX:
     281        case WM_CTLCOLOREDIT:
     282        case WM_CTLCOLORLISTBOX:
     283        case WM_CTLCOLORBTN:
     284        case WM_CTLCOLORDLG:
     285        case WM_CTLCOLORSTATIC:
     286        case WM_CTLCOLORSCROLLBAR:
     287                SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
     288                SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
     289                return GetSysColorBrush(COLOR_BTNFACE);
     290
     291        case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!!
     292                dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd));
     293                return 0;
     294
     295        default:
     296                return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam);
     297    }
     298}
     299//******************************************************************************
     300//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.