Create hello-platform for Windows #10
No files matched your search
@@ -1,7 +1,7 @@
|
|||||||
import WinSDK
|
import WinSDK
|
||||||
|
|
||||||
func otherSetupWindowIcons(_ iconId: Int) {
|
func otherSetupWindowIcon(_ iconId: Int) {
|
||||||
// Only visit windows owned by this UI thread, never another application's window.
|
// Only visit windows owned by this UI thread, never another application's window
|
||||||
EnumThreadWindows(GetCurrentThreadId(), { wnd, iconId in
|
EnumThreadWindows(GetCurrentThreadId(), { wnd, iconId in
|
||||||
let resource = UnsafePointer<WCHAR>(bitPattern: Int(iconId))
|
let resource = UnsafePointer<WCHAR>(bitPattern: Int(iconId))
|
||||||
let module = GetModuleHandleW(nil)
|
let module = GetModuleHandleW(nil)
|
||||||
@@ -30,7 +30,6 @@ func otherSetupWindowIcons(_ iconId: Int) {
|
|||||||
SendMessageW(wnd, UINT(WM_SETICON), WPARAM(ICON_BIG), LPARAM(Int(bitPattern: large)))
|
SendMessageW(wnd, UINT(WM_SETICON), WPARAM(ICON_BIG), LPARAM(Int(bitPattern: large)))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shared resource icons remain valid for the lifetime of the process.
|
|
||||||
return true
|
return true
|
||||||
}, LPARAM(iconId))
|
}, LPARAM(iconId))
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ final class HPAppDelegate {
|
|||||||
func setup() {
|
func setup() {
|
||||||
otherSetupConsoleLogging(hp.ctrl, "HP")
|
otherSetupConsoleLogging(hp.ctrl, "HP")
|
||||||
hp.setup()
|
hp.setup()
|
||||||
otherSetupWindowIcons(101)
|
otherSetupWindowIcon(101)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user