Window procedure, handles all messages for this program
| 256 | |
| 257 | // Window procedure, handles all messages for this program |
| 258 | LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) |
| 259 | { |
| 260 | static HMENU hMenu; |
| 261 | static ILuint Colours; |
| 262 | static RECT Rect; |
| 263 | static PAINTSTRUCT ps; |
| 264 | static HDROP hDrop; |
| 265 | |
| 266 | static TCHAR OpenFilter[2048]; |
| 267 | static TCHAR SaveFilter[2048]; |
| 268 | static TCHAR *OFilter[] = { |
| 269 | L"All Files (*.*)", L"*.*", |
| 270 | L"Alias|Wavefront Files (*.pix)", L"*.pix", |
| 271 | L"Cut Files (*.cut)", L"*.cut", |
| 272 | L"Dcx Files (*.dcx)", L"*.dcx", |
| 273 | L"Graphics Interchange Format (*.gif)", L"*.gif", |
| 274 | L"Half-Life Model Files (*.mdl)", L"*.mdl", |
| 275 | L"Homeworld Image Files (*.lif)", L"*.lif", |
| 276 | L"Image Files (All Supported Types)", L"*.jpe;*.jpg;*.jpeg;*.lif;*.bmp;*.ico;*.pbm;*.pgm;*.pnm;*.ppm;*.png;*.bw;*.rgb;*.rgba;*.sgi;*.tga;*.tif;*.tiff;*.pcx;*.xpm;*.psp;*.psd;*.pix;*.pxr;*.cut;*.dcx", |
| 277 | L"Jpeg Files (*.jpe, *.jpg, *.jpeg)", L"*.jpe;*.jpg;*.jpeg", |
| 278 | L"Kodak Photo CD Files (*.pcd)", L"*.pcd", |
| 279 | L"Microsoft Bitmap Files (*.bmp)", L"*.bmp", |
| 280 | L"Microsoft DirectDraw Surface (*.dds)", L"*.dds", |
| 281 | L"Microsoft Icon Files (*.ico, *.cur)", L"*.ico, *.cur", |
| 282 | L"Multiple Network Graphics Files (*.mng)", L"*.mng", |
| 283 | L"Paint Shop Pro Files (*.psp)", L"*.psp", |
| 284 | L"PhotoShop Files (*.psd)", L"*.psd", |
| 285 | L"Pic Files (*.pic)", L"*.pic", |
| 286 | L"Pixar Files (*.pix)", L"*.pix", |
| 287 | L"Portable AnyMap Files (*.pbm, *.pgm, *.pnm, *.ppm)", L"*.pbm;*.pgm;*.pnm;*.ppm", |
| 288 | L"Portable Network Graphics Files (*.png)", L"*.png", |
| 289 | L"Sgi Files (*.sgi)", L"*.bw;*.rgb;*.rgba;*.sgi", |
| 290 | L"Targa Files (*.tga, *.vda, *.icb, *.vst)", L"*.tga;*.vda;*.icb;*.vst", |
| 291 | L"Tiff Files (*.tif)", L"*.tif;*.tiff", |
| 292 | L"Valve Texture Files (*.vtf)", L"*.vtf", |
| 293 | L"Quake Wal Files (*.wal)", L"*.wal", |
| 294 | L"X PixelMap (*.xpm)", L"*.xpm", |
| 295 | L"ZSoft Pcx Files (*.pcx)", L"*.pcx", |
| 296 | L"\0\0" |
| 297 | }; |
| 298 | static TCHAR *SFilter[] = { |
| 299 | L"All Files (*.*)", L"*.*", |
| 300 | L"C-Style Header (*.h)", L"*.h", |
| 301 | L"Jpeg Files (*.jpe, *.jpg, *.jpeg)", L"*.jpe;*.jpg;*.jpeg", |
| 302 | L"Microsoft Bitmap Files (*.bmp)", L"*.bmp", |
| 303 | L"Microsoft DirectDraw Surface (*.dds)", L"*.dds", |
| 304 | L"PhotoShop Files (*.psd)", L"*.psd", |
| 305 | L"Portable AnyMap Files (*.pbm, *.pgm, *.ppm)", L"*.pbm;*.pgm;*.ppm", |
| 306 | L"Portable Network Graphics Files (*.png)", L"*.png", |
| 307 | L"Sgi Files (*.sgi)", L"*.bw;*.rgb;*.rgba;*.sgi", |
| 308 | L"Targa Files (*.tga)", L"*.tga", |
| 309 | L"Tiff Files (*.tif)", L"*.tif", |
| 310 | L"ZSoft Pcx Files (*.pcx)", L"*.pcx", |
| 311 | L"\0\0" |
| 312 | }; |
| 313 | static OPENFILENAME Ofn = { |
| 314 | sizeof(OPENFILENAME), |
| 315 | hWnd, |
nothing calls this directly
no test coverage detected