Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Macros | Functions
VisualPng.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include "png.h"
#include "pngfile.h"
#include "resource.h"

Go to the source code of this file.

Macros

#define PROGNAME   "VisualPng"
 
#define LONGNAME   "Win32 Viewer for PNG-files"
 
#define VERSION   "1.0 of 2000 June 07"
 
#define MARGIN   8
 

Functions

LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM)
 
BOOL CALLBACK AboutDlgProc (HWND, UINT, WPARAM, LPARAM)
 
BOOL CenterAbout (HWND hwndChild, HWND hwndParent)
 
BOOL BuildPngList (PTSTR pstrPathName, TCHAR **ppFileList, int *pFileCount, int *pFileIndex)
 
BOOL SearchPngList (TCHAR *pFileList, int FileCount, int *pFileIndex, PTSTR pstrPrevName, PTSTR pstrNextName)
 
BOOL LoadImageFile (HWND hwnd, PTSTR pstrPathName, png_byte **ppbImage, int *pxImgSize, int *pyImgSize, int *piChannels, png_color *pBkgColor)
 
BOOL DisplayImage (HWND hwnd, BYTE **ppDib, BYTE **ppDiData, int cxWinSize, int cyWinSize, BYTE *pbImage, int cxImgSize, int cyImgSize, int cImgChannels, BOOL bStretched)
 
BOOL InitBitmap (BYTE *pDiData, int cxWinSize, int cyWinSize)
 
BOOL FillBitmap (BYTE *pDiData, int cxWinSize, int cyWinSize, BYTE *pbImage, int cxImgSize, int cyImgSize, int cImgChannels, BOOL bStretched)
 
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
 

Macro Definition Documentation

◆ LONGNAME

#define LONGNAME   "Win32 Viewer for PNG-files"

Definition at line 16 of file VisualPng.c.

◆ MARGIN

#define MARGIN   8

Definition at line 21 of file VisualPng.c.

Referenced by FillBitmap().

◆ PROGNAME

#define PROGNAME   "VisualPng"

Definition at line 15 of file VisualPng.c.

◆ VERSION

#define VERSION   "1.0 of 2000 June 07"

Definition at line 17 of file VisualPng.c.

Function Documentation

◆ AboutDlgProc()

BOOL CALLBACK AboutDlgProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 429 of file VisualPng.c.

References CenterAbout(), FALSE, and TRUE.

◆ BuildPngList()

BOOL BuildPngList ( PTSTR  pstrPathName,
TCHAR **  ppFileList,
int pFileCount,
int pFileIndex 
)

Definition at line 511 of file VisualPng.c.

References BOOL, free(), i, malloc(), NULL, and TRUE.

◆ CenterAbout()

BOOL CenterAbout ( HWND  hwndChild,
HWND  hwndParent 
)

Definition at line 457 of file VisualPng.c.

References BOOL, and NULL.

Referenced by AboutDlgProc().

◆ DisplayImage()

BOOL DisplayImage ( HWND  hwnd,
BYTE **  ppDib,
BYTE **  ppDiData,
int  cxWinSize,
int  cyWinSize,
BYTE *  pbImage,
int  cxImgSize,
int  cyImgSize,
int  cImgChannels,
BOOL  bStretched 
)

Definition at line 701 of file VisualPng.c.

References free(), malloc(), and NULL.

◆ FillBitmap()

BOOL FillBitmap ( BYTE *  pDiData,
int  cxWinSize,
int  cyWinSize,
BYTE *  pbImage,
int  cxImgSize,
int  cyImgSize,
int  cImgChannels,
BOOL  bStretched 
)

Definition at line 803 of file VisualPng.c.

References free(), malloc(), MARGIN, NULL, and TRUE.

◆ InitBitmap()

BOOL InitBitmap ( BYTE *  pDiData,
int  cxWinSize,
int  cyWinSize 
)

Definition at line 769 of file VisualPng.c.

References TRUE.

◆ LoadImageFile()

BOOL LoadImageFile ( HWND  hwnd,
PTSTR  pstrPathName,
png_byte **  ppbImage,
int pxImgSize,
int pyImgSize,
int piChannels,
png_color pBkgColor 
)

Definition at line 657 of file VisualPng.c.

References FALSE, free(), NULL, PngLoadImage(), and TRUE.

◆ SearchPngList()

BOOL SearchPngList ( TCHAR *  pFileList,
int  FileCount,
int pFileIndex,
PTSTR  pstrPrevName,
PTSTR  pstrNextName 
)

Definition at line 615 of file VisualPng.c.

References FALSE, NULL, and TRUE.

◆ WinMain()

int WINAPI WinMain ( HINSTANCE  hInstance,
HINSTANCE  hPrevInstance,
PSTR  szCmdLine,
int  iCmdShow 
)

Definition at line 77 of file VisualPng.c.

References msg, and WndProc().

◆ WndProc()

LRESULT CALLBACK WndProc ( HWND  hwnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 145 of file VisualPng.c.

References BOOL, NULL, PngFileInitialize(), and TRUE.

Referenced by WinMain().