257ba58b5dd7fefe3b14223a1b3d3971184e194d
[reactos.git] / rosapps / devutils / zoomin / framewnd.c
1 /*
2 * ReactOS zoomin
3 *
4 * framewnd.c
5 *
6 * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
7 *
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.
12 *
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.
17 *
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.
21 */
22
23 #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
24 #include <windows.h>
25 #include <tchar.h>
26
27 #include "main.h"
28 #include "framewnd.h"
29
30
31 ////////////////////////////////////////////////////////////////////////////////
32 // Global and Local Variables:
33 //
34
35
36 ////////////////////////////////////////////////////////////////////////////////
37 // Local module support methods
38 //
39
40
41 ////////////////////////////////////////////////////////////////////////////////
42 //
43 // FUNCTION: _CmdWndProc(HWND, unsigned, WORD, LONG)
44 //
45 // PURPOSE: Processes WM_COMMAND messages for the main frame window.
46 //
47 //
48
49 static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
50 {
51 switch (LOWORD(wParam)) {
52 // Parse the menu selections:
53 case ID_EDIT_EXIT:
54 DestroyWindow(hWnd);
55 break;
56 case ID_EDIT_COPY:
57 case ID_EDIT_REFRESH:
58 case ID_OPTIONS_REFRESH_RATE:
59 case ID_HELP_ABOUT:
60 // TODO:
61 break;
62 default:
63 return FALSE;
64 }
65 return TRUE;
66 }
67
68 ////////////////////////////////////////////////////////////////////////////////
69 //
70 // FUNCTION: FrameWndProc(HWND, unsigned, WORD, LONG)
71 //
72 // PURPOSE: Processes messages for the main frame window.
73 //
74 // WM_COMMAND - process the application menu
75 // WM_DESTROY - post a quit message and return
76 //
77 //
78
79 LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
80 {
81 switch (message) {
82 case WM_CREATE:
83 break;
84 case WM_COMMAND:
85 if (!_CmdWndProc(hWnd, message, wParam, lParam)) {
86 return DefWindowProc(hWnd, message, wParam, lParam);
87 }
88 break;
89 case WM_SIZE:
90 break;
91 case WM_TIMER:
92 break;
93 case WM_DESTROY:
94 PostQuitMessage(0);
95 default:
96 return DefWindowProc(hWnd, message, wParam, lParam);
97 }
98 return 0;
99 }
100