/*[]=====================================================================[]*/ /*[] LEADTOOLS for Windows - []*/ /*[] []*/ /*[] []*/ /*[] Copyright (c) 1991-2000 LEAD Technologies, Inc. []*/ /*[] All Rights Reserved. []*/ /*[]=====================================================================[]*/ L_BOOL InitApplication (HANDLE hInstance); L_BOOL InitInstance (HANDLE hInstance, L_INT nCmdShow); L_INT32 EXT_FUNCTION MainWndProc (HWND hWnd, L_UINT Message, WPARAM wParam, LPARAM lParam); /* Use this function to fit a displayed image to particular space. ResultTop and ResultLeft are optional parameters for centering the image. */ void CalcDisplay (L_INT WidthAllowed, L_INT HeightAllowed, L_INT WidthFactor, L_INT HeightFactor, L_INT *ResultTop, L_INT *ResultLeft, L_INT *ResultWidth, L_INT *ResultHeight); /* Global variables */ RECT rWndSize; /* RECT for sizing the window. */ RECT rClientSize; /* RECT for the client area. */ RECT rLeadDest; /* RECT for the destination rectangle for painting. */ RECT rLeadSource; /* RECT for the source rectangle for painting. */ HPALETTE hpalPaint; /* Paint palette handle. */ L_TCHAR szFilename[L_MAXPATH]; /* Name of the file to load. */ BITMAPHANDLE LeadBitmap; /* Bitmap handle to hold the loaded image. */ L_INT DisplayWidth, DisplayHeight; /* Dimensions of the displayed image */