docs icon indicating copy to clipboard operation
docs copied to clipboard

CALL /show refinement description is inaccurate

Open hiiamboris opened this issue 7 years ago • 0 comments

>> ? call
....
     /show        => Force the display of system's shell window (Windows only).
....

Two problems:

  1. "of shell window" wording is misleading
  2. it is reflected nowhere that without this flag the window will be forcefully hidden

Because, as seen from https://github.com/red/red/blob/8d712e4ba1b16e1b7a339006d1154aebc9cb7ce4/runtime/call.reds#L324 in the absence of /show it uses the wShowWindow field of STARTUPINFO structure, which is never initialized explicitly and thus defaults to 0 = SW_HIDE. As a consequence, any GUI program called without /show cannot be interacted with (try call {notepad.exe}). (Although due to a bug some Red GUI programs are still visible partly on W7 - only those parts that are emulated using layered windows mechanics, but it's another topic)

hiiamboris avatar May 10 '19 16:05 hiiamboris