📄 webimgview.h
字号:
// WebImgView.h : interface of the CWebImgView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_WEBIMGVIEW_H__6EA55683_AC23_11D2_85BC_00400528ECE2__INCLUDED_)
#define AFX_WEBIMGVIEW_H__6EA55683_AC23_11D2_85BC_00400528ECE2__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "Wlink.h"
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//IMAGELIB STUFF
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define MY_API __stdcall
const IDLoadTimer = 1;
const IDAnimateTimer = 2;
//******************************************************************************
//This is our own structure used for display
//******************************************************************************}
struct TMyGifAnimation
{
char FrameName[250]; //The name of the frame. Reserved field
WORD ScreenWidth; //Logical screen width. Only in frame 1
WORD ScreenHeight; //Logical screen height. Only in frame 1
BYTE GlobalColorTableSize; //size of the color table
BYTE GlobalColorTableFlag; //Use GlobalColor table
BYTE LocalColorTableFlag; //Has Local color table
BYTE LocalColorTableSize; //size of the color table
COLORREF BackGroundColor; //Whats the background color. Only in frame 1
WORD Left; //Left position of the frame
WORD Top; //Top position of the frame
WORD Width; //Height of the frame
WORD Height; //Height of the frame
BYTE InterlaceFlag; //Is interlaced
BYTE DisposalMethod; //How to dispose previous frame
BYTE TransparentColorFlag; //Has Transparent color
BYTE TransparentColorIndex; //Color Index to the palette of the transparent color
WORD DelayTime; //Time to delay in mili seconds
long NetLoops; //Loops to run used by Netscape
HANDLE HDib; //Handle to the gif dib
HPALETTE hPAL; //Handle to the color palette
};
//*****************************************************************************************
//INITIALIZATION CALL
typedef void (MY_API *InitDll) (HWND, const char *);
//*****************************************************************************************
//CONVERTS A DDB TO DIB
typedef short (MY_API *DdbtoDib)(unsigned int hddb,
unsigned int hpal,
short resolution,
short dither,
void *outdib,
short numclrs,
PALETTEENTRY * pal,
short errormode,
long v_object,
short(*pf)(short, long));
//READ ANIMATED GIF CALL
typedef short (MY_API *an_rdgiffiledib)(const char *filename, // Name of file to read
COLORREF MapTransColor, // Transparent Color
short (*pfcallapp)( // Callback Function
HANDLE, // Handle for Dib
void *, // Pointer to GIF Header (Structure)
void *, // Pointer to Image Descreptor (Structure)
void *, // Pointer to Graphical Control Ext.(Strucure)
long, // Number of Netscape loops
char *, // Point to Comment Extension
short, // Progressive showing
long), // Value of pointer to the calling object
long VOBJECT, // Value of pointer to the calling object
const char *lzwpasswd, // Unisys password
short errormode); // '1' for showing error, '0' for silence
//*****************************************************************************************
typedef short (MY_API *an_wtgiffiledib)(char * filename, //Filename to save to
short numFrames, //Number of frames to save
long ScreenWidth, //Width of Display Screem in Pixels
long ScreenHeight,//Height of Display Screem in Pixels
short BackgroundColor, // Background color index
short resolution, // Resolution
short numCommentBlocks,
long Netloops,
short (*callapp)(
HANDLE*,
WORD *,
WORD *,
WORD *,
WORD *,
BYTE *,
BYTE *,
BYTE *,
BYTE *,
BYTE *,
BYTE *,
BYTE *,
BYTE *,
WORD *,
BYTE *,
char *,
short,
short,
long),
long VOBJECT, // Value of pointer to the calling object
const char* lzwpasswd, // Unisys password
short errormode); //'1' for showing error, '0' for silence
//*****************************************************************************************
typedef short (MY_API *rdpngfiledibprog) (const char *filename, //Pointer to File name
short resolution, // Image resolution
short displayoption, //1 - interlaced, 0 - not interlaced
long v_object, // Value of pointer to the calling object
short(*UpdateProgressCallBack)
(short, long), //Callback function (Progress)
short(*DibUpdateCallBack)
(HANDLE, long), //Callback function (return DIB)
short errormode, //'1' for showing error, '0' for silence
long backcolor); //Background color
//*****************************************************************************************
typedef short (MY_API *wrpngfiledib) (const char *filename, //Pointer to File name
short resolution, // Image resolution
short interlaced, // 1-Interlaced, 0 - not interlaced
unsigned int hdib, // Handle to DIB
long v_object, // Value of pointer to the calling object
short(*UpdateProgressCallBack)
(short, long), //Callback function (Progress)
short errormode); //'1' for showing error, '0' for silence
//*****************************************************************************************
typedef short (MY_API *rdjpgfiledibprog) (const char *filename, //Pointer to File name
short resolution, // Image resolution
long v_object, // Value of pointer to the calling object
short(*UpdateProgressCallBack)
(short, long), //Callback function (Progress)
short(*DibUpdateCallBack)
(HANDLE, long), //Callback function (return DIB)
short errormode, //'1' for showing error, '0' for silence
long backcolor); // Background color
//*****************************************************************************************
typedef short (MY_API *wrjpgfiledib) (const char *filename, //Pointer to File name
short quality, // Quality value
short smooth, // Smooth value (0-100)
short resolution, // Image resolution
unsigned int hdib, // Handel to DIB
long v_object, // Value of pointer to the calling object
short(*UpdateProgressCallBack)
(short, long), //Callback function (Progress)
short errormode); //'1' for showing error, '0' for silence
//*****************************************************************************************
typedef short (MY_API *rdbmpfiledib) (const char *filename, //Pointer to File name
short resolution, // Image resolution
short dither, // Dither value
unsigned int * hdib, // Handle to DIB
unsigned int hpal, // Palette value
long v_object, // Value of pointer to the calling object
short(*UpdateProgressCallBack)
(short, long), //Callback function (Progress)
short errormode); //'1' for showing error, '0' for silence
//*****************************************************************************************
typedef short (MY_API *wrbmpfiledib) (const char *filename, //Pointer to File name
short resolution, // Image resolution
unsigned int hdib, // Handle to DIB
long v_object, // Value of pointer to the calling object
short(*UpdateProgressCallBack)
(short, long), //Callback function (Progress)
short errormode); //'1' for showing error, '0' for silence
//*****************************************************************************************
typedef short (MY_API *ReduceDib)(void * &outdib, //Handle to DIB (Retirn new DIB)
short resolution, //New Image resolution
short dither, // Dither
short numclrs, //Number of colors
PALETTEENTRY * pal, // Palette entry structure
short errormode, //'1' for showing error, '0' for silence
long v_object, // Value of pointer to the calling object
short(*UpdateProgressCallBack)(short, long)); //Callback function (Progress)
//*****************************************************************************************
typedef short (MY_API *ilcompressfile) (char *fromfile, //File name
char *tofile, //Arhiv file name
char *header, //Header for arhiv file name
int headersize, // Header size in bites
int level, // Comression level (from 0 to 9) 0-low, 9-high
long v_object, // Value of pointer to the calling object
short(*UpdateProgressCallBack)
(short, long)); //Callback function (Progress)
//*****************************************************************************************
typedef short (MY_API *ildecompressfile) (char *fromfile, //Arhive file name
char *tofile, //File name for extracting
int headersize, //Header size
long v_object, // Value of pointer to the calling object
short(*UpdateProgressCallBack)
(short, long)); //Callback function (Progress)
//*****************************************************************************************
typedef short (MY_API *ilcompressbuf) (void *frombuf, //Source buffer,
void *tobuf, //Destination buffer
long frombufsize, //Source buffer size
long *tobufsize, //Return destination buffer size
int level, // Comression level
long v_object, // Value of pointer to the calling object
short(*UpdateProgressCallBack)
(short, long)); //Callback function (Progress)
//*****************************************************************************************
typedef short (MY_API *ildecompressbuf) (void *frombuf, //Source buffer
void *tobuf, //Destination buffer
long frombufsize, //Source buffer size
long *tobufsize, //Destination buffer size
long v_object, // Value of pointer to the calling object
short(*UpdateProgressCallBack)
(short, long));//Callback function (Progress)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -