-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPicture.h
45 lines (36 loc) · 1.65 KB
/
Picture.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//-----------------------------------------------------------------------------
// Picture (Prototypes) Version 1.00
//
// Routins 4 Showing Picture Files... (.BMP .DIB .EMF .GIF .ICO .JPG .WMF)
//
// Author: Dr. Yovav Gad, EMail: [email protected] ,Web: www.SuperMain.com
//=============================================================================
#if !defined(AFX_PICTURE_H__COPYFREE_BY_YOVAV_GAD__SOURCES_AT_SUPERMAIN_DOT_COM__INCLUDED_)
#define AFX_PICTURE_H__COPYFREE_BY_YOVAV_GAD__SOURCES_AT_SUPERMAIN_DOT_COM__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CPicture
{
public:
void FreePictureData();
BOOL Load(CString sFilePathName);
BOOL Load(UINT ResourceName, LPCSTR ResourceType);
BOOL LoadPictureData(BYTE* pBuffer, int nSize);
BOOL SaveAsBitmap(CString sFilePathName);
BOOL Show(CDC* pDC, CPoint LeftTop, CPoint WidthHeight, int MagnifyX, int MagnifyY);
BOOL Show(CDC* pDC, CRect DrawRect);
BOOL ShowCentered(CDC* pDC, CRect DrawRect);
/* By Nick */
BOOL ShowSection(CDC* pDC, CRect DrawRect, CRect UpdateRect);
//BOOL Show(HDC* pHDC, CRect DrawRect);
BOOL ShowBitmapResource(CDC* pDC, const int BMPResource, CPoint LeftTop);
BOOL UpdateSizeOnDC(CDC* pDC);
CPicture();
virtual ~CPicture();
IPicture* m_IPicture; // Same As LPPICTURE (typedef IPicture __RPC_FAR *LPPICTURE)
LONG m_Height; // Height (In Pixels Ignor What Current Device Context Uses)
LONG m_Weight; // Size Of The Image Object In Bytes (File OR Resource)
LONG m_Width; // Width (In Pixels Ignor What Current Device Context Uses)
};
#endif // !defined(AFX_PICTURE_H__COPYFREE_BY_YOVAV_GAD__SOURCES_AT_SUPERMAIN_DOT_COM__INCLUDED_)