windows.bitmap.h.xml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <chapter xml:id="windows.bitmap.h">
  2. <title><tt>__vic/windows/bitmap.h</tt></title>
  3. <chapter xml:id="windows--Bitmap">
  4. <title><tt>windows::Bitmap</tt></title>
  5. <code-block lang="C++">
  6. class windows::Bitmap
  7. {
  8. public:
  9. Bitmap() = default;
  10. explicit Bitmap(HBITMAP h);
  11. static Bitmap CreateCompatible(HDC hdc, int w, int h);
  12. bool DeleteNT() noexcept;
  13. void Delete();
  14. void ClearHandle();
  15. HBITMAP Handle() const;
  16. void Handle(HBITMAP h);
  17. operator HBITMAP() const;
  18. };
  19. </code-block>
  20. <p>C++ wrapper for Win32 API <tt>HBITMAP</tt>.</p>
  21. <section><title>Class members</title>
  22. <synopsis>
  23. <prototype>Bitmap() = default</prototype>
  24. <p>Creates an uninitialized value.</p>
  25. </synopsis>
  26. <synopsis>
  27. <prototype>explicit Bitmap(HBITMAP h)</prototype>
  28. <postcondition><tt>Handle() == h</tt></postcondition>
  29. </synopsis>
  30. <synopsis>
  31. <prototype>static Bitmap CreateCompatible(HDC hdc, int w, int h)</prototype>
  32. <p>Calls <tt>::CreateCompatibleBitmap()</tt>.</p>
  33. </synopsis>
  34. <synopsis>
  35. <prototype>bool DeleteNT() noexcept</prototype>
  36. <p>Calls <tt>::DeleteObject()</tt> and returns <tt>false</tt> on error.</p>
  37. </synopsis>
  38. <synopsis>
  39. <prototype>void Delete()</prototype>
  40. <p>Calls <tt>::DeleteObject()</tt> and throws on error.</p>
  41. </synopsis>
  42. <synopsis>
  43. <prototype>void ClearHandle()</prototype>
  44. <postcondition><tt>!Handle()</tt></postcondition>
  45. </synopsis>
  46. <synopsis>
  47. <prototype>HBITMAP Handle() const</prototype>
  48. <prototype>operator HBITMAP() const</prototype>
  49. <p>Returns the wrapped HBITMAP value.</p>
  50. </synopsis>
  51. <synopsis>
  52. <prototype>void Handle(HBITMAP h)</prototype>
  53. <postcondition><tt>Handle() == h</tt></postcondition>
  54. </synopsis>
  55. </section>
  56. </chapter>
  57. </chapter>