MCPcopy Create free account
hub / github.com/DentonW/DevIL / WndProc

Function WndProc

DevIL/test/DDrawTest/test_window/WindowTest.cpp:153–549  ·  view source on GitHub ↗

Window procedure, handles all messages for this program

Source from the content-addressed store, hash-verified

151
152// Window procedure, handles all messages for this program
153LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
154{
155 static HDC hDC; // Private GDI Device context
156 static HMENU hMenu; // Handle to the menu
157 static ILuint Colours;
158 static RECT Rect;
159
160 static char OpenFileName[512];
161 static char OpenFilter[512];
162 static char SaveFileName[512];
163 static char SaveFilter[512];
164 static char *OFilter[] = {
165 "All Files (*.*)", "*.*",
166 "Jpeg Files (*.jpe, *.jpg, *.jpeg)", "*.jpe;*.jpg;*.jpeg",
167 "Microsoft Bitmap Files (*.bmp)", "*.bmp",
168 "Microsoft Icon Files (*.ico)", "*.ico",
169 "Portable AnyMap Files (*.pbm, *.pgm, *.ppm)", "*.pbm;*.pgm;*.ppm",
170 "Portable Network Graphics Files (*.png)", "*.png",
171 "Sgi Files (*.sgi)", "*.bw;*.rgb;*.rgba;*.sgi",
172 "Targa Files (*.tga)", "*.tga",
173 "Tiff Files (*.tif)", "*.tif;*.tiff",
174 "ZSoft Pcx Files (*.pcx)", "*.pcx",
175 "\0\0"
176 };
177 static char *SFilter[] = {
178 "All Files (*.*)", "*.*",
179 "C-Style Header (*.h)", "*.h",
180 "Jpeg Files (*.jpe, *.jpg, *.jpeg)", "*.jpe;*.jpg;*.jpeg",
181 "Microsoft Bitmap Files (*.bmp)", "*.bmp",
182 "Portable AnyMap Files (*.pbm, *.pgm, *.ppm)", "*.pbm;*.pgm;*.ppm",
183 "Portable Network Graphics Files (*.png)", "*.png",
184 "Sgi Files (*.sgi)", "*.bw;*.rgb;*.rgba;*.sgi",
185 "Targa Files (*.tga)", "*.tga",
186 "ZSoft Pcx Files (*.pcx)", "*.pcx",
187 "\0\0"
188 };
189
190
191 static OPENFILENAME Ofn = {
192 sizeof(OPENFILENAME),
193 hWnd,
194 NULL,
195 OpenFilter,
196 NULL,
197 0,
198 0,
199 OpenFileName,
200 512,
201 NULL,
202 0,
203 NULL,
204 NULL,
205 OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST,
206 0,
207 0,
208 NULL,
209 NULL,
210 NULL,

Callers

nothing calls this directly

Calls 2

CreateBitmapInfoStructFunction · 0.85
GenFilterStringFunction · 0.70

Tested by

no test coverage detected