Skip to content

Commit

Permalink
Documenting resource freeing; #38.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigocfd committed Jun 22, 2022
1 parent 2fc72c5 commit c2a0f7f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/user/handles/hinstance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ pub trait UserHinstance: Handle {
/// [`LoadIcon`](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadiconw)
/// method.
///
/// **Note:** Must be paired with an
/// [`HICON::DestroyIcon`](crate::prelude::UserHicon::DestroyIcon) call.
///
/// # Examples
///
/// Loading a system icon:
Expand All @@ -147,6 +150,9 @@ pub trait UserHinstance: Handle {

/// [`LoadImage`](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadimagew)
/// method for [`HBITMAP`](crate::HBITMAP).
///
/// **Note:** Must be paired with an
/// [`HBITMAP::DeleteObject`](crate::prelude::HandleGdi::DeleteObject) call.
#[must_use]
fn LoadImageBitmap(self,
name: IdObmStr, sz: SIZE, load: co::LR) -> WinResult<HBITMAP>
Expand All @@ -161,6 +167,10 @@ pub trait UserHinstance: Handle {

/// [`LoadImage`](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadimagew)
/// method for [`HCURSOR`](crate::HCURSOR).
///
/// **Note:** Must be paired with an
/// [`HCURSOR::DestroyCursor`](crate::prelude::UserHcursor::DestroyCursor)
/// call.
#[must_use]
fn LoadImageCursor(self,
name: IdOcrStr, sz: SIZE, load: co::LR) -> WinResult<HCURSOR>
Expand All @@ -175,6 +185,9 @@ pub trait UserHinstance: Handle {

/// [`LoadImage`](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadimagew)
/// method for [`HICON`](crate::HICON).
///
/// **Note:** Must be paired with an
/// [`HICON::DestroyIcon`](crate::prelude::UserHicon::DestroyIcon) call.
#[must_use]
fn LoadImageIcon(self,
name: IdOicStr, sz: SIZE, load: co::LR) -> WinResult<HICON>
Expand Down

0 comments on commit c2a0f7f

Please sign in to comment.