Skip to content

Commit

Permalink
make it possible to create an icon from an existing HICON
Browse files Browse the repository at this point in the history
  • Loading branch information
zobzn committed May 12, 2017
1 parent 5d9372f commit bda0818
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions icon.go
Expand Up @@ -105,6 +105,10 @@ func NewIconFromImage(im image.Image) (ic *Icon, err error) {
return &Icon{hIcon: hIcon}, nil
}

func NewIconFromHICON(hIcon win.HICON) (ic *Icon, err error) {
return &Icon{hIcon: hIcon}, nil
}

// Dispose releases the operating system resources associated with the Icon.
func (i *Icon) Dispose() {
if i.isStock || i.hIcon == 0 {
Expand Down

0 comments on commit bda0818

Please sign in to comment.