Replies: 2 comments
-
Alrighty, there's two bits here:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I don't want to mess with it; I only want to use it to position GUI thingies nicely with respect to the user interface. IIRC, others wanted to do the same thing. You can get that HWND anyway. It's just the window of a user interface, hardly the sort of thing Windows keeps a secret. I don't see the big deal in making getting it easy. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I replied to "DISCUSSION: Is my app running in Terminal? #7434" but that reply isn't showing up anywhere (excuse me if I'm impatient).
With specific regard to a shell wanting to know where the Windows Terminal user interface is ...
I revisit this every now and then. I'm using the process ID of GetConsoleWindow() and a Toolhelp32Snapshot to find the parent process of OpenConsole.exe. Then I use EnumWindows() to find a CASCADIA_HOSTING_WINDOW_CLASS window belonging to that parent. It works, at least to my satisfaction, but it's a bit cumbersome.
Could you make the handle of the CASCADIA_HOSTING_WINDOW_CLASS window more readily available? One thought is to put it in the value of the WT_SESSION environment variable (along with the GUID which is (AFAICT) useless to the shell.
WT_SESSION=69f813f0-06ef-49d5-a64a-95359e0305c8, 0x303C0
A shell might be looking for the existence of that variable anyway. If it's value had more useful information in it, that would be great.
Am I wrong about the GUID? Is it of any value to the shell (or to anyone)?
Beta Was this translation helpful? Give feedback.
All reactions