-
-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Using slideshow on some windows 10 machines results in the following error:
CreateIconIndirect: call failed (87)
Interactions disabled: slideshow does not support a REPL (no #%top-interaction)
The interim means to resolve this error is at https://groups.google.com/d/msg/racket-users/vYVaGAff1o8/gBjuCCjdAQAJ
Instruction to reproduce https://groups.google.com/d/msg/racket-users/vYVaGAff1o8/xzXy4xQ6AgAJ
the minimal program which reproduces the issue on Windows 10, version1809:
#lang racket/gui
(require racket/draw)
(define f (new frame% [label "hello"] [width 100] [height 100]))
(define bmp
(let* ([bm (make-object bitmap% 32 32)]
[dc (make-object bitmap-dc% bm)])
(send dc set-brush "red" 'solid)
(send dc draw-rectangle 0 0 (send bm get-width) (send bm get-height))
(send dc set-bitmap #f)
bm))
(send f set-icon bmp #f 'both)
(send f show #t)
Any program which tries to set the icon on a frame will fail regardless of the icon. Slideshow fails because it tries to set the icon on the frame. It seems that the W32 API call CreateIconIndirect() fails because it thinks the bitmap passes in is invalid.
@mflatt noted:
It looks like the problem is that the main bitmap given to
CreateIconIndirect
is scaled, but the mask bitmap is not scaled (inbitmap->hbitmap
). So, replicating the error also requires a high-resolution screen with scaling enabled.
(see thread linked above)