6 * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
43 ////////////////////////////////////////////////////////////////////////////////
45 static void OnPaint(HWND hWnd
, ChildWnd
* pChildWnd
)
49 GetClientRect(hWnd
, &rt
);
50 BeginPaint(hWnd
, &ps
);
52 // lastBrush = SelectObject(ps.hdc, (HBRUSH)GetStockObject(WHITE_BRUSH));
53 // Rectangle(ps.hdc, rt.left, rt.top-1, rt.right, rt.bottom+1);
54 // SelectObject(ps.hdc, lastBrush);
55 // rt.top = rt.bottom - GetSystemMetrics(SM_CYHSCROLL);
56 FillRect(ps
.hdc
, &rt
, GetStockObject(BLACK_BRUSH
));
58 rt.left = pChildWnd->nSplitPos-SPLIT_WIDTH/2;
59 rt.right = pChildWnd->nSplitPos+SPLIT_WIDTH/2+1;
60 lastBrush = SelectBrush(ps.hdc, (HBRUSH)GetStockObject(COLOR_SPLITBAR));
61 Rectangle(ps.hdc, rt.left, rt.top-1, rt.right, rt.bottom+1);
62 SelectObject(ps.hdc, lastBrush);
64 rt.top = rt.bottom - GetSystemMetrics(SM_CYHSCROLL);
65 FillRect(ps.hdc, &rt, GetStockObject(BLACK_BRUSH));
73 // FUNCTION: ChildWndProc(HWND, unsigned, WORD, LONG)
75 // PURPOSE: Processes messages for the pChildWnd windows.
77 // WM_COMMAND - process the application menu
78 // WM_PAINT - Paint the main window
79 // WM_DESTROY - post a quit message and return
82 LRESULT CALLBACK
PanelWndProc(HWND hWnd
, UINT message
, WPARAM wParam
, LPARAM lParam
)
85 // ChildWnd* pChildWnd = (ChildWnd*)GetWindowLong(hWnd, GWL_USERDATA);
86 // ChildWnd* new_child;
94 OnPaint(hWnd
, 0/*pChildWnd*/);
98 pane = GetFocus()==pChildWnd->left.hWnd? &pChildWnd->left: &pChildWnd->right;
99 switch(LOWORD(wParam)) {
100 case ID_WINDOW_NEW_WINDOW:
103 return pane_command(pane, LOWORD(wParam));
108 return DefWindowProc(hWnd
, message
, wParam
, lParam
);