-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuxtheme.go
More file actions
35 lines (27 loc) · 694 Bytes
/
Copy pathuxtheme.go
File metadata and controls
35 lines (27 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2010 The win Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package win
import (
"syscall"
"unsafe"
)
var (
// Library
libuxtheme uintptr
// Functions
setWindowTheme uintptr
)
func init() {
// Library
libuxtheme = MustLoadLibrary("uxtheme.dll")
// Functions
setWindowTheme = MustGetProcAddress(libuxtheme, "SetWindowTheme")
}
func SetWindowTheme(hwnd HWND, pszSubAppName, pszSubIdList *uint16) HRESULT {
ret, _, _ := syscall.Syscall(setWindowTheme, 3,
uintptr(hwnd),
uintptr(unsafe.Pointer(pszSubAppName)),
uintptr(unsafe.Pointer(pszSubIdList)))
return HRESULT(ret)
}