Main.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. //---------------------------------------------------------------------------------------------
  2. //---------------------------------------------------------------------------------------------
  3. //
  4. // MNGView Sample Application for VC6:
  5. // Loads all MNG/JNG/PNG Files LibMNG can do
  6. // Can save a single Frame to PNG Format.
  7. //
  8. // This code is public domain.
  9. // Created by Nikolaus Brennig, November 14th, 2000.
  10. // [email protected]
  11. // http://cust.nol.at/ppee
  12. //
  13. // Tab: 4
  14. //
  15. //---------------------------------------------------------------------------------------------
  16. //---------------------------------------------------------------------------------------------
  17. #ifndef _MAIN_H
  18. #define _MAIN_H
  19. //---------------------------------------------------------------------------------------------
  20. // Includes:
  21. //---------------------------------------------------------------------------------------------
  22. #define WIN32_LEAN_AND_MEAN
  23. #include <windows.h>
  24. #include <windowsx.h>
  25. #include <commdlg.h>
  26. #include <commctrl.h>
  27. #include "Resource.h"
  28. //---------------------------------------------------------------------------------------------
  29. // Defines:
  30. //---------------------------------------------------------------------------------------------
  31. #define TITLE "MNGView Sample Application 1.0"
  32. //---------------------------------------------------------------------------------------------
  33. // global Vars:
  34. //---------------------------------------------------------------------------------------------
  35. extern HWND hPicWin;
  36. extern HINSTANCE hinst;
  37. extern HDC MemDC, hdc;
  38. extern HBITMAP MemImage, DefaultMemImage;
  39. extern int W, H, Bits;
  40. typedef struct
  41. {
  42. int MaxFrame;
  43. int CurFrame;
  44. int Delay;
  45. int isAnimation;
  46. } ANIMFILE;
  47. extern ANIMFILE AnimFile;
  48. //---------------------------------------------------------------------------------------------
  49. // Function prototypes:
  50. //---------------------------------------------------------------------------------------------
  51. BOOL Error( const char *err );
  52. BOOL Warning( const char *err );
  53. VOID catpath( char *dst, const char *src );
  54. // MNG.cpp specific:
  55. VOID LoadMNG( LPSTR Filename, HWND hwnd, HDC hdc );
  56. VOID SaveMNG( LPSTR Filename, HDC hdc, HBITMAP hBmp );
  57. VOID UpdateMNG();
  58. VOID CleanUpMNG();
  59. #endif