#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include "GUIScrollbars_Ex.au3"
#include <winapi.au3>
Local $msg, $form1, $pic, $chlid
Local $x = 400, $y = 100
$form1 = GUICreate("My GUI", 400, 400, $x, $y)
$pic = GUICtrlCreatePic("1.jpg", 0, 0, 400, 400)
GUICtrlSetState(-1, $gui_disable)
$chlid = GUICreate("MY Chlid", 400 - 3, 300, $x + 3, $y + 30, $WS_POPUPWINDOW, $WS_EX_LAYERED, $form1)
$button1=GUICtrlCreateButton("ok", 10, 10)
GUISetState(@SW_SHOW, $chlid)
GUISetState(@SW_SHOW, $form1)
GUISetBkColor(0xabcdef, $chlid)
_WinAPI_SetLayeredWindowAttributes($chlid, 0xabcdef, 255)
_GUIScrollbars_Generate($chlid, 0, 400)
GUIRegisterMsg($WM_MOVE, "shift_child")
_SendMessage($form1, $WM_NCACTIVATE, 1)
While 1
$msg = GUIGetMsg()
Switch $msg
case -3
Exit
case $button1
msgbox(0,0,"ok")
EndSwitch
WEnd
Func shift_child($hwnd, $msg, $wparam, $lparam)
If $hwnd = $form1 Then
Local $wp = WinGetPos($form1)
WinMove($chlid, '', $wp[0] + 3, $wp[1] + 30)
EndIf
EndFunc
|