@@ -15,7 +15,7 @@ ms.assetid: 52861e3d-bf7e-481f-a240-90e88f76c490
1515
1616## Syntax
1717
18- ```
18+ ``` cpp
1919class CImage
2020```
2121
@@ -148,7 +148,7 @@ You can use `CImage` from either MFC or ATL.
148148
149149Displays bitmaps that have transparent or semitransparent pixels.
150150
151- ```
151+ ```cpp
152152BOOL AlphaBlend(
153153 HDC hDestDC,
154154 int xDest,
@@ -267,7 +267,7 @@ The bitmap can be either a non-DIB section bitmap or a DIB section bitmap. See [
267267
268268Copies a bitmap from the source device context to this current device context.
269269
270- ```
270+ ```cpp
271271BOOL BitBlt(
272272 HDC hDestDC,
273273 int xDest,
@@ -343,7 +343,7 @@ For more information, see [`BitBlt`](/windows/win32/api/wingdi/nf-wingdi-bitblt)
343343
344344Constructs a ` CImage ` object.
345345
346- ```
346+ ``` cpp
347347CImage () throw();
348348```
349349
@@ -359,7 +359,7 @@ Using global `CImage` objects in a DLL is not recommended. If you need to use a
359359
360360Creates a ` CImage ` bitmap and attach it to the previously constructed ` CImage ` object.
361361
362- ```
362+ ``` cpp
363363BOOL Create (
364364 int nWidth,
365365 int nHeight,
@@ -394,7 +394,7 @@ Nonzero if successful; otherwise 0.
394394
395395Creates a `CImage` bitmap and attach it to the previously constructed `CImage` object.
396396
397- ```
397+ ```cpp
398398BOOL CreateEx(
399399 int nWidth,
400400 int nHeight,
@@ -458,7 +458,7 @@ void Destroy() throw();
458458
459459Detaches a bitmap from a ` CImage ` object.
460460
461- ```
461+ ``` cpp
462462HBITMAP Detach () throw();
463463```
464464
@@ -470,7 +470,7 @@ A handle to the bitmap detached, or `NULL` if no bitmap is attached.
470470
471471Copies a bitmap from the source device context to the current device context.
472472
473- ```
473+ ``` cpp
474474BOOL Draw (
475475 HDC hDestDC,
476476 int xDest,
@@ -579,7 +579,7 @@ Using this pointer, along with the value returned by [`GetPitch`](#getpitch), yo
579579
580580Retrieves the bits-per-pixel value.
581581
582- ```
582+ ``` cpp
583583int GetBPP () const throw();
584584```
585585
@@ -619,7 +619,7 @@ A pointer to the array of [`RGBQUAD`](/windows/win32/api/wingdi/ns-wingdi-rgbqua
619619
620620Retrieves the device context that currently has the image selected into it.
621621
622- ```
622+ ```cpp
623623HDC GetDC() const throw();
624624```
625625
@@ -635,7 +635,7 @@ For each call to `GetDC`, you must have a subsequent call to [`ReleaseDC`](#rele
635635
636636Finds image formats available for saving images.
637637
638- ```
638+ ``` cpp
639639static HRESULT GetExporterFilterString (
640640 CSimpleString& strExporters,
641641 CSimpleArray<GUID>& aguidFileTypes,
@@ -718,7 +718,7 @@ Use the default separator `|` if you pass this string to an MFC `CFileDialog` ob
718718
719719Retrieves the height, in pixels, of an image.
720720
721- ```
721+ ``` cpp
722722int GetHeight () const throw();
723723```
724724
@@ -730,7 +730,7 @@ The height, in pixels, of an image.
730730
731731Finds image formats available for loading images.
732732
733- ```
733+ ``` cpp
734734static HRESULT GetImporterFilterString (
735735 CSimpleString& strImporters,
736736 CSimpleArray<GUID>& aguidFileTypes,
@@ -809,7 +809,7 @@ Use the default separator `|` if you pass this string to an MFC `CFileDialog` ob
809809
810810Retrieves the maximum number of entries in the color table.
811811
812- ```
812+ ``` cpp
813813int GetMaxColorTableEntries () const throw();
814814```
815815
@@ -825,7 +825,7 @@ This method supports only DIB section bitmaps.
825825
826826Retrieves the pitch of an image.
827827
828- ```
828+ ``` cpp
829829int GetPitch () const throw();
830830```
831831
@@ -846,7 +846,7 @@ Use `GetPitch` with [`GetBits`](#getbits) to find individual pixels of an image.
846846
847847Retrieves the color of the pixel at the location specified by * x* and * y* .
848848
849- ```
849+ ``` cpp
850850COLORREF GetPixel (int x, int y) const throw();
851851```
852852
@@ -891,7 +891,7 @@ For formats that have less than 8 bits per pixel, this method returns the addres
891891
892892Retrieves the indexed location of the transparent color in the color palette.
893893
894- ```
894+ ``` cpp
895895LONG GetTransparentColor () const throw();
896896```
897897
@@ -903,7 +903,7 @@ The index of the transparent color.
903903
904904Retrieves the width, in pixels, of an image.
905905
906- ```
906+ ``` cpp
907907int GetWidth () const throw();
908908```
909909
@@ -915,7 +915,7 @@ The width of the bitmap, in pixels.
915915
916916Determines if the attached bitmap is a DIB section.
917917
918- ```
918+ ``` cpp
919919bool IsDIBSection () const throw();
920920```
921921
@@ -945,7 +945,7 @@ If the bitmap is not a DIB section, you cannot use the following `CImage` method
945945
946946Determines whether a bitmap's pixels are mapped to a color palette.
947947
948- ```
948+ ``` cpp
949949bool IsIndexed () const throw();
950950```
951951
@@ -964,7 +964,7 @@ This method returns `TRUE` only if the bitmap is 8-bit (256 colors) or less.
964964
965965Determines if a bitmap is currently loaded.
966966
967- ```
967+ ``` cpp
968968bool IsNull () const throw();
969969```
970970
@@ -976,7 +976,7 @@ This method returns `TRUE` if a bitmap is not currently loaded; otherwise `FALSE
976976
977977Indicates whether the application supports transparent bitmaps.
978978
979- ```
979+ ``` cpp
980980static BOOL IsTransparencySupported () throw();
981981```
982982
@@ -992,7 +992,7 @@ If the return value is nonzero, and transparency is supported, a call to [`Alpha
992992
993993Loads an image.
994994
995- ```
995+ ``` cpp
996996HRESULT Load (LPCTSTR pszFileName) throw();
997997HRESULT Load(IStream* pStream) throw();
998998```
@@ -1048,7 +1048,7 @@ The resource must be of type `BITMAP`.
10481048
10491049Combines the color data for the source and destination bitmaps using the specified mask and raster operation.
10501050
1051- ```
1051+ ``` cpp
10521052BOOL MaskBlt (
10531053 HDC hDestDC,
10541054 int xDest,
@@ -1147,7 +1147,7 @@ Use this operator to get the attached Windows GDI handle of the `CImage` object.
11471147
11481148Performs a bit-block transfer from a rectangle in a source device context into a parallelogram in a destination device context.
11491149
1150- ```
1150+ ```cpp
11511151BOOL PlgBlt(
11521152 HDC hDestDC,
11531153 const POINT* pPoints,
@@ -1245,7 +1245,7 @@ This method must be called to free resources allocated by a global `CImage` obje
12451245
12461246Saves an image to the specified stream or file on disk.
12471247
1248- ```
1248+ ``` cpp
12491249HRESULT Save (
12501250 IStream* pStream,
12511251 REFGUID guidFileType) const throw();
@@ -1391,7 +1391,7 @@ The red, green, and blue parameters are each represented by a number between 0 a
13911391
13921392Sets a color at a given indexed location as transparent.
13931393
1394- ```
1394+ ```cpp
13951395LONG SetTransparentColor(LONG iTransparentColor) throw();
13961396```
13971397
@@ -1408,7 +1408,7 @@ The index of the color previously set as transparent.
14081408
14091409Copies a bitmap from the source device context to this current device context.
14101410
1411- ```
1411+ ``` cpp
14121412BOOL StretchBlt (
14131413 HDC hDestDC,
14141414 int xDest,
@@ -1491,7 +1491,7 @@ For more information, see [`StretchBlt`](/windows/win32/api/wingdi/nf-wingdi-str
14911491
14921492Copies a bitmap from the source device context to this current device context.
14931493
1494- ```
1494+ ```cpp
14951495BOOL TransparentBlt(
14961496 HDC hDestDC,
14971497 int xDest,
0 commit comments