?? imageviewer.h
字號:
/***************************************************************************
ImageViewer.h : header file for the Image Viewer tool
written by PJ Arends
pja@telus.net
For updates check http://www3.telus.net/pja/ImageViewer.htm
-----------------------------------------------------------------------------
This code is provided as is, with no warranty as to it's suitability or usefulness
in any application in which it may be used. This code has not been tested for
UNICODE builds, nor has it been tested on a network ( with UNC paths ).
This code may be used in any way you desire. This file may be redistributed by any
means as long as it is not sold for profit, and providing that this notice and the
authors name are included.
If any bugs are found and fixed, a note to the author explaining the problem and
fix would be nice.
-----------------------------------------------------------------------------
Instructions on using the Image Viewer utility
==============================================
The Image Viewer utility is used to show the contents of memory device contexts
and in memory bitmaps while you are stepping through some drawing code.
To use the image viewer utility, make sure the ViewerDll.dll file is in your
executable path, the ViewerApp.exe program is running, the ViewerDll.lib
file is in your library include path, and then simply include this file
in any file you want to use it in. This utility only works in debug builds
and you turn the tool on by #defining the 'ACTIVATE_VIEWER' macro.
ie.
#define ACTIVATE_VIEWER
#include "ImageViewer.h"
This file defines these macros
ShowBitmap (HBITMAP bmp)
bmp [in] - A HBITMAP or a CBitmap object
Displays the contents of an in memory bitmap
ShowDC (HDC dc)
dc [in] - A HDC or a CDC object
Displays the contents of a memory device context
If the ACTIVATE_VIEWER and _DEBUG macros are not defined, the ShowBitmap()
and ShowDC() macros are ignored, The ViewerDll.lib file is not linked, and
the ViewerDll.dll is not loaded.
If the Image Viewer tool is active, the VIEWER_ACTIVE macro will be defined,
so you can control extra code around the ShowDC() and ShowBitmap() macros
by checking for the VIEWER_ACTIVE macro.
ie.
#ifdef VIEWER_ACTIVE
// Some code that requires the image viewer tool
#endif // VIEWER_ACTIVE
****************************************************************************/
#ifndef PJA_IMAGE_VIEWER_UTILITY_HEADER_FILE_INCLUDED
#define PJA_IMAGE_VIEWER_UTILITY_HEADER_FILE_INCLUDED
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#undef VIEWER_ACTIVE
#ifdef _DEBUG
#ifdef ACTIVATE_VIEWER
#define VIEWER_ACTIVE
#endif // ACTIVATE_VIEWER
#endif // _DEBUG
#ifdef VIEWER_ACTIVE
#pragma comment(lib, "viewerdll")
#define ShowBitmap(bmp) ImageView((bmp))
#define ShowDC(dc) ImageView((HBITMAP)::GetCurrentObject((dc),OBJ_BITMAP))
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
__declspec(dllimport) void ImageView(HBITMAP);
// Do not call ImageView() directly in your code, doing so will
// cause linker and/or run time errors if the Image Viewer tool
// is turned off. Use the ShowDC() and ShowBitmap() macros instead.
#ifdef __cplusplus
}
#endif // __cplusplus
#else // VIEWER_ACTIVE
#define ShowBitmap(bmp)
#define ShowDC(dc)
#endif // VIEWER_ACTIVE
#endif // PJA_IMAGE_VIEWER_UTILITY_HEADER_FILE_INCLUDED
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -