[Need help] attach notepad or other application to browser

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
bluesky
Posts: 11
Joined: 24 Dec 2020, 20:15

[Need help] attach notepad or other application to browser

Post by bluesky » 19 Jul 2021, 05:48

Use setparent and attach notepad to ahk gui,but can not to browser(firefox,or chrome).

here is the code, notepad is disappeared to backgroud

Code: Select all

hC := WinExist("ahk_class Notepad")
hH := WinExist("ahk_class Chrome_WidgetWin_1") 
hH := WinExist("ahk_class MozillaWindowClass") 

WinActivate, ahk_class Notepad
WinSet, Style, % -(WS_POPUP|WS_CAPTION|WS_THICKFRAME)
WinSet, Style, +%WS_CHILD%
WinSet, ExStyle, -%WS_EX_CLIENTEDGE%

hwndNew := DllCall("SetParent", "Ptr", hC, "Ptr", hH)
msgbox,SetParent(%hC%, %hH%) = %hwndNew%

Return to “Ask for Help (v1)”