skin_H皮肤可以实现之
;DllCall($__SkinH_DLL, "int", "SkinH_SetTitleMenuBar", "hwnd", $hWnd, "BOOLEAN", $bEnable, "int", $nTMenuY, "int", $nTopOffs, "int", $nRightOffs)
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
Local $defaultstatus = "Ready", $status, $filemenu, $fileitem
Local $helpmenu, $saveitem, $infoitem, $exititem, $recentfilesmenu
Local $separator1, $viewmenu, $viewstatusitem, $okbutton, $cancelbutton
Local $statuslabel, $msg, $file,$Form1
$Form1=GUICreate("My GUI menu", 300, 200)
$filemenu = GUICtrlCreateMenu("&File")
$fileitem = GUICtrlCreateMenuItem("Open", $filemenu)
GUICtrlSetState(-1, $GUI_DEFBUTTON)
$helpmenu = GUICtrlCreateMenu("?")
$saveitem = GUICtrlCreateMenuItem("Save", $filemenu)
GUICtrlSetState(-1, $GUI_DISABLE)
$infoitem = GUICtrlCreateMenuItem("Info", $helpmenu)
$exititem = GUICtrlCreateMenuItem("Exit", $filemenu)
$recentfilesmenu = GUICtrlCreateMenu("Recent Files", $filemenu, 1)
$separator1 = GUICtrlCreateMenuItem("", $filemenu, 2) ; create a separator line
$viewmenu = GUICtrlCreateMenu("View", -1, 1) ; is created before "?" menu
$viewstatusitem = GUICtrlCreateMenuItem("Statusbar", $viewmenu)
GUICtrlSetState(-1, $GUI_CHECKED)
$okbutton = GUICtrlCreateButton("OK", 50, 130, 70, 20)
GUICtrlSetState(-1, $GUI_FOCUS)
$cancelbutton = GUICtrlCreateButton("Cancel", 180, 130, 70, 20)
$statuslabel = GUICtrlCreateLabel($defaultstatus, 0, 165, 300, 16, BitOR($SS_SIMPLE, $SS_SUNKEN))
skin()
GUISetState()
While 1
$msg = GUIGetMsg()
If $msg = $fileitem Then
$file = FileOpenDialog("Choose file...", @TempDir, "All (*.*)")
If @error <> 1 Then GUICtrlCreateMenuItem($file, $recentfilesmenu)
EndIf
If $msg = $viewstatusitem Then
If BitAND(GUICtrlRead($viewstatusitem), $GUI_CHECKED) = $GUI_CHECKED Then
GUICtrlSetState($viewstatusitem, $GUI_UNCHECKED)
GUICtrlSetState($statuslabel, $GUI_HIDE)
Else
GUICtrlSetState($viewstatusitem, $GUI_CHECKED)
GUICtrlSetState($statuslabel, $GUI_SHOW)
EndIf
EndIf
If $msg = $GUI_EVENT_CLOSE Or $msg = $cancelbutton Or $msg = $exititem Then ExitLoop
If $msg = $infoitem Then MsgBox(0, "Info", "Only a test...")
WEnd
GUIDelete()
Func Skin()
$Dll = DllOpen("SkinH_EL.dll")
DllCall($Dll, "int", "SkinH_AttachEx", "str", "QQ2009.she", "str", "benkel")
DllCall($DLL, "int", "SkinH_SetTitleMenuBar", "hwnd", $Form1, "BOOLEAN", True, "int", 0, "int", 0, "int", 100)
;~ DllCall($Dll, "int", "SkinH_AttachEx", "str", $She, "str", "benkel")
;~ DllCall($Dll, "int", "SkinH_SetWindowAlpha", "int", $Form1, "int", 255)
;~ DllCall($Dll, "int", "SkinH_AdjustAero", "int", 100, "int", 0, "int", 0, "int", 0, "int", 0, "int", 0, "int", 0, "int", 100, "int", 100)
;~ DllCall($Dll, "int", "SkinH_SetWindowAlpha", "int", $Form1, "int", 220);设置控件透明?GUICtrlGetHandle($Button1)
EndFunc ;==>Skin
|