wozu das gut sein soll, weiß ich nicht, aber vielleicht hilft dir sowat
Code: Alles auswählen
#Window = 1
RunProgram("Notepad.exe","","",#PB_Program_Hide)
Delay(100) ;!!!!
hwnd_xyz = FindWindow_(0, "Unbenannt - Editor")
; RunProgram("C:\Programme\Windows NT\Pinball\PINBALL.EXE","","")
; Delay(100) ;!!!!
; hwnd_xyz = FindWindow_(0, "3D-Pinball für Windows - Space Cadet")
GetWindowRect_(hwnd_xyz, r.rect)
br = r\right - r\left - 6
hh = r\bottom - r\top - 25
OpenWindow(#Window, 60, 90, br, hh, "Test" )
SetParent_(hwnd_xyz, WindowID(#Window))
;Titelzeile entfernen
style = GetWindowLong_(hwnd_xyz, #GWL_STYLE)
style & ~#WS_CAPTION
SetWindowLong_(hwnd_xyz, #GWL_STYLE, style)
SetWindowPos_(hwnd_xyz,0,0,0,br,hh,#SWP_SHOWWINDOW)
SmartWindowRefresh(#Window, 1)
SetActiveWindow(#Window)
Repeat
event = WaitWindowEvent(1)
Until event = #PB_Event_CloseWindow
End