From 8898ad9b25fca6afe2374d293a981db02a83d7e9 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 31 May 2012 14:46:27 +0000 Subject: Committing the documentation to svn to have it accessible online --- Doc/doxygen/html/_thumbnail_8cpp_source.html | 174 +++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 Doc/doxygen/html/_thumbnail_8cpp_source.html (limited to 'Doc/doxygen/html/_thumbnail_8cpp_source.html') diff --git a/Doc/doxygen/html/_thumbnail_8cpp_source.html b/Doc/doxygen/html/_thumbnail_8cpp_source.html new file mode 100644 index 0000000..6f8441e --- /dev/null +++ b/Doc/doxygen/html/_thumbnail_8cpp_source.html @@ -0,0 +1,174 @@ + + + + + +Starshatter_Open: D:/SRC/StarshatterSVN/Magic2/Thumbnail.cpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Starshatter_Open +
+
Open source Starshatter engine
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
Thumbnail.cpp
+
+
+Go to the documentation of this file.
1 /* Project Magic 2.0
+
2  Destroyer Studios LLC
+
3  Copyright © 1997-2004. All Rights Reserved.
+
4 
+
5  SUBSYSTEM: Magic.exe
+
6  FILE: Thumbnail.h
+
7  AUTHOR: John DiCamillo
+
8 
+
9 
+
10  OVERVIEW
+
11  ========
+
12  Thumbnail.cpp : implementation file
+
13 */
+
14 
+
15 #include "stdafx.h"
+
16 #include "Bitmap.h"
+
17 
+
18 // +--------------------------------------------------------------------+
+
19 // Preview a bitmap image in the desired window
+
20 // +--------------------------------------------------------------------+
+
21 
+
22 void ThumbPreview(HWND hprev, Bitmap* bitmap)
+
23 {
+
24  HDC hdc = ::GetDC(hprev);
+
25  RECT rect;
+
26  BITMAPINFO* pbmiDIB = new BITMAPINFO;
+
27 
+
28  if (!pbmiDIB)
+
29  return;
+
30 
+
31  ::GetClientRect(hprev, &rect);
+
32 
+
33  pbmiDIB->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+
34  pbmiDIB->bmiHeader.biWidth = bitmap->Width();
+
35  pbmiDIB->bmiHeader.biHeight = -bitmap->Height();
+
36  pbmiDIB->bmiHeader.biPlanes = 1;
+
37  pbmiDIB->bmiHeader.biBitCount = 32;
+
38  pbmiDIB->bmiHeader.biCompression = BI_RGB;
+
39  pbmiDIB->bmiHeader.biSizeImage = 0;
+
40  pbmiDIB->bmiHeader.biXPelsPerMeter = 0;
+
41  pbmiDIB->bmiHeader.biYPelsPerMeter = 0;
+
42  pbmiDIB->bmiHeader.biClrUsed = 0;
+
43  pbmiDIB->bmiHeader.biClrImportant = 0;
+
44 
+
45  int result =
+
46  ::StretchDIBits(hdc,
+
47  1, 1, 128, 128,
+
48  0, 0, bitmap->Width(), bitmap->Height(),
+
49  bitmap->HiPixels(),
+
50  pbmiDIB,
+
51  DIB_RGB_COLORS,
+
52  SRCCOPY);
+
53 
+
54  ::ReleaseDC(hprev, hdc);
+
55 
+
56  delete pbmiDIB;
+
57 }
+
+
+ + + + -- cgit v1.1