12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <chapter xml:id="windows.bitmap.h">
- <title><tt>__vic/windows/bitmap.h</tt></title>
- <chapter xml:id="windows--Bitmap">
- <title><tt>windows::Bitmap</tt></title>
- <code-block lang="C++">
- class windows::Bitmap
- {
- public:
- Bitmap() = default;
- explicit Bitmap(HBITMAP h);
- static Bitmap CreateCompatible(HDC hdc, int w, int h);
- bool DeleteNT() noexcept;
- void Delete();
- void ClearHandle();
- HBITMAP Handle() const;
- void Handle(HBITMAP h);
- operator HBITMAP() const;
- };
- </code-block>
- <p>C++ wrapper for Win32 API <tt>HBITMAP</tt>.</p>
- <section><title>Class members</title>
- <synopsis>
- <prototype>Bitmap() = default</prototype>
- <p>Creates an uninitialized value.</p>
- </synopsis>
- <synopsis>
- <prototype>explicit Bitmap(HBITMAP h)</prototype>
- <postcondition><tt>Handle() == h</tt></postcondition>
- </synopsis>
- <synopsis>
- <prototype>static Bitmap CreateCompatible(HDC hdc, int w, int h)</prototype>
- <p>Calls <tt>::CreateCompatibleBitmap()</tt>.</p>
- </synopsis>
- <synopsis>
- <prototype>bool DeleteNT() noexcept</prototype>
- <p>Calls <tt>::DeleteObject()</tt> and returns <tt>false</tt> on error.</p>
- </synopsis>
- <synopsis>
- <prototype>void Delete()</prototype>
- <p>Calls <tt>::DeleteObject()</tt> and throws on error.</p>
- </synopsis>
- <synopsis>
- <prototype>void ClearHandle()</prototype>
- <postcondition><tt>!Handle()</tt></postcondition>
- </synopsis>
- <synopsis>
- <prototype>HBITMAP Handle() const</prototype>
- <prototype>operator HBITMAP() const</prototype>
- <p>Returns the wrapped HBITMAP value.</p>
- </synopsis>
- <synopsis>
- <prototype>void Handle(HBITMAP h)</prototype>
- <postcondition><tt>Handle() == h</tt></postcondition>
- </synopsis>
- </section>
- </chapter>
- </chapter>
|