00001 /* 00002 * This file is part of the Standard Portable Library (SPL). 00003 * 00004 * SPL is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation, either version 3 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * SPL is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with SPL. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 #ifndef _cleanwindows_h 00018 #define _cleanwindows_h 00019 00020 #ifdef _WINDOWS_ 00021 //#pragma message ( " " ) 00022 //#pragma message ( "You have included windows.h before cleanwindows.h" ) 00023 //#pragma message ( "All useless stuff from the windows headers won't be excluded !!!" ) 00024 //#pragma message ( " " ) 00025 #endif // _WINDOWS_ 00026 00027 // Don't define the following because we need it 00028 //#define NOVIRTUALKEYCODES 1 // VK_ESCAPE, VK_SPACE 00029 //#define NOWINMESSAGES 1 // WM_QUIT, WM_INITDIALOG, LB_ADDSTRING 00030 //#define NOWINSTYLES 1 // WS_OVERLAPPEDWINDOW, WS_SYSMENU, CS_OWNDC 00031 //#define NOSHOWWINDOW 1 // SW_SHOWNORMAL, SW_HIDE 00032 //#define NOCOLOR 1 // COLOR_GRAYTEXT 00033 //#define NOCTLMGR 1 // GetDlgItem, CheckDlgButton, DialogBox, LB_RESETCONTENT, CBN_SELCHANGE 00034 //#define NOGDI 1 // DEVMODE 00035 //#define NOUSER 1 // MessageBox, GetCursorPos, PeekMessage, WM_CLOSE 00036 //#define NOMB 1 // MessageBox, MB_OK 00037 //#define NOMSG 1 // PeekMessage, MSG, PM_NOREMOVE 00038 //#define NOWINOFFSETS 1 // SetWindowLong, GWL_STYLE 00039 00040 00041 // Define the following to exclude some unused services from the windows headers. 00042 // For information on what the following defenitions will exclude, look in the windows.h header file. 00043 #define NOGDICAPMASKS 00044 #define NOSYSMETRICS 00045 #define NOMENUS 00046 #define NOICONS 00047 #define NOKEYSTATES 00048 #define NOSYSCOMMANDS 00049 #define NORASTEROPS 00050 #define NOATOM 00051 #define NOCLIPBOARD 00052 #define NODRAWTEXT 00053 #define NOKERNEL 00054 #define NONLS 00055 #define NOMEMMGR 00056 #define NOMETAFILE 00057 #define NOMINMAX 00058 #define NOOPENFILE 00059 #define NOSCROLL 00060 #define NOSERVICE 00061 #define NOSOUND 00062 #define NOTEXTMETRIC 00063 #define NOWH 00064 #define NOCOMM 00065 #define NOKANJI 00066 #define NOHELP 00067 #define NOPROFILER 00068 #define NODEFERWINDOWPOS 00069 #define NOMCX 00070 #define NOCRYPT 00071 00072 // Define these for MFC projects 00073 #define NOTAPE 00074 #define NOIMAGE 00075 #define NOPROXYSTUB 00076 #define NORPC 00077 #define NOIME 00078 00079 // Also define WIN32_LEAN_AND_MEAN to exclude rarely-used services from windows headers. 00080 #define WIN32_LEAN_AND_MEAN 00081 00082 // Finally now we can include windows.h 00083 #include <windows.h> 00084 00085 //#include <commdlg.h> // For GetSaveFileName, GetOpenFileName and OPENFILENAME 00086 // commdlg.h is included in windows.h but doesn't get included with WIN32_LEAN_AND_MEAN 00087 // We still use WIN32_LEAN_AND_MEAN because we can include commdlg.h here and WIN32_LEAN_AND_MEAN 00088 // excludes much more than commdlg.h 00089 00090 #endif // _cleanwindows_h 00091