PixelLightAPI  .
Static Public Member Functions
PLGraphics::ImageToolsWindows Class Reference

Static class with some useful Windows image tools. More...

#include <ImageToolsWindows.h>

List of all members.

Static Public Member Functions

static PLGRAPHICS_API HBITMAP ConvertToHBitmap (Image &cImage, HDC hDC)
 Returns a Windows-friendly bitmap handle.
static PLGRAPHICS_API bool SetHBitmap (Image &cImage, HBITMAP hBitmap)
 Sets the current image to be a copy of a Windows bitmap.
static PLGRAPHICS_API bool GetWinClipboard (Image &cImage)
 Copies the Windows clipboard to the current image.
static PLGRAPHICS_API bool SetWinClipboard (Image &cImage)
 Copies an image to the Windows clipboard.
static PLGRAPHICS_API bool LoadResource (Image &cImage, HINSTANCE hInst, int nID, const PLCore::String &sResourceType, const PLCore::String &sFileType)
 Loads a Windows resource as the current image.

Detailed Description

Static class with some useful Windows image tools.


Member Function Documentation

static PLGRAPHICS_API HBITMAP PLGraphics::ImageToolsWindows::ConvertToHBitmap ( Image cImage,
HDC  hDC 
) [static]

Returns a Windows-friendly bitmap handle.

Parameters:
[in]cImageImage to use
[in]hDCThe device context that you want to receive the HBITMAP
Returns:
Windows-friendly bitmap handle
Note:
  • Creates a Windows bitmap handle (HBITMAP) copy of the current image, for direct use in Windows
  • Use the windows function DeleteObject() to free the bitmap
static PLGRAPHICS_API bool PLGraphics::ImageToolsWindows::SetHBitmap ( Image cImage,
HBITMAP  hBitmap 
) [static]

Sets the current image to be a copy of a Windows bitmap.

Parameters:
[in]cImageImage to use
[in]hBitmapBitmap to copy to the given image
Returns:
'true' if all went fine, else 'false'
Remarks:
Copies hBitmap to the given image in a 'normal' format we can understand. The image can then be used just as if you had loaded an image via Image::Load(). This function is the opposite of ConvertToHBitmap().
static PLGRAPHICS_API bool PLGraphics::ImageToolsWindows::GetWinClipboard ( Image cImage) [static]

Copies the Windows clipboard to the current image.

Parameters:
[in]cImageImage to use
Returns:
'true' if all went fine, else 'false'
Remarks:
Copies the contents of the Windows clipboard into the given image, resizing as necessary.
static PLGRAPHICS_API bool PLGraphics::ImageToolsWindows::SetWinClipboard ( Image cImage) [static]

Copies an image to the Windows clipboard.

Parameters:
[in]cImageImage to use
Returns:
'true' if all went fine, else 'false'
Copies the given image to the Windows clipboard
static PLGRAPHICS_API bool PLGraphics::ImageToolsWindows::LoadResource ( Image cImage,
HINSTANCE  hInst,
int  nID,
const PLCore::String sResourceType,
const PLCore::String sFileType 
) [static]

Loads a Windows resource as the current image.

Parameters:
[in]cImageImage to use
[in]hInstThe application's HINSTANCE
[in]nIDThe resource identifier of the resource to be loaded
[in]sResourceTypeThe type of user-defined resource (name used when creating)
[in]sFileTypeThe type of image to be loaded, e.g. "bmp". Pass empty string to let the type be determined automatically
Returns:
'true' if all went fine, else 'false'
Remarks:
Windows-specific function that loads a resource as the given image. This feature allows you to have images directly in your .exe and not worry whether a particular file is present on the user's hard drive.

The documentation for this class was generated from the following file:


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:31
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported