hi,
ich möchte gerne SumatraPDF als eingebettetes fenster in meiner gui verwenden.D.h. ich möchte ein Fenster OHNE Menü,ohne resize,close,maximze, dass nicht verschoben werden kann.Der code bisher:
C
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
$hGUI = GUICreate("Test", 800, 600, -1, -1, BitOr($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_CLIPCHILDREN))
$PID = Run("C:\Programme\SumatraPDF\SumatraPDF.exe -plugin "&$hGUI, "", @SW_HIDE)
$hWnd = 0
$stPID = DllStructCreate("int")
Do
$WinList = WinList()
For $i = 1 To $WinList[0][0]
If $WinList[$i][0] <> "" Then
DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $WinList[$i][1], "ptr", DllStructGetPtr($stPID))
If DllStructGetData($stPID, 1) = $PID Then
$hWnd = $WinList[$i][1]
ExitLoop
EndIf
EndIf
Next
Sleep(100)
Until $hWnd <> 0
$stPID = 0
If $hWnd <> 0 Then
$nExStyle = DllCall("user32.dll", "int", "GetWindowLong", "hwnd", $hWnd, "int", -20)
$nExStyle = $nExStyle[0]
DllCall("user32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", -20, "int", BitOr($nExStyle, $WS_EX_MDICHILD))
DllCall("user32.dll", "int", "SetParent", "hwnd", $hWnd, "hwnd", $hGUI)
WinSetState($hWnd, "", @SW_SHOW)
WinMove($hWnd, "", 0, 0, 600, 400)
EndIf
GUISetState()
While 1
$msg = GUIGetMsg()
If $msg = -3 Then ExitLoop
WEnd
Alles anzeigen
weiss jemand rat?
gruß,david