风行者 发表于 2010-11-13 09:49:50

窗口标题样式例子

本帖最后由 风行者 于 2012-1-21 01:43 编辑

目的方便用的时候查看,需要的就拿去吧
#include <WindowsConstants.au3>
GUICreate('全部按钮', Default, Default, Default, Default,BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX))
GUISetState()
Do
Until GUIGetMsg() = -3



#include <WindowsConstants.au3>
GUICreate('空白窗口', Default, Default, Default, Default, $WS_CAPTION)
GUISetState()
Do
Until GUIGetMsg() = -3



#include <WindowsConstants.au3>
GUICreate('只有关闭按钮', Default, Default, Default, Default, Bitor($WS_CAPTION,$WS_SYSMENU))
GUISetState()
Do
Until GUIGetMsg() = -3



#include <WindowsConstants.au3>
GUICreate('最小化按钮不可用', Default, Default, Default, Default,$GUI_SS_DEFAULT_GUI - $WS_MAXIMIZEBOX)
GUISetState()
Do
Until GUIGetMsg() = -3



#include <WindowsConstants.au3>
Const $SC_CLOSE = 0xF060
Const $MF_BYCOMMAND = 0x00000000
Const $MF_GRAYED = 0x00000001
$Form = GUICreate("关闭按钮不可用")
; EnableMenultem(GetSystemMenu(hwnd,FALSE),SC_CLOSE,MF_BYCOMMAND I MF_GRAYED);
$HWND = DllCall("User32.dll","HANDLE","GetSystemMenu","HWND",$Form,"BOOL",False) ;得到菜单句柄
DllCall("User32.dll","BOOL","EnableMenuItem","HANDLE",$HWND,"UINT",$SC_CLOSE,"UINT",BitOR($MF_BYCOMMAND,$MF_GRAYED))

GUISetState()
Do
Until GUIGetMsg() = -3


上面使用she皮肤之后没用,改用下面代码可以解决
$dll = DllOpen(@TempDir &"\mySkin.dll")
DllCall($Dll, "int", "SkinH_AttachEx", "str", $skins, "str", "mhgd")
DllCall($Dll, "int", "SkinH_SetAero", "int", 1)

Const $SC_CLOSE = 0xF060
Const $MF_REMOVE = 0x01000
$Form = GUICreate("关闭按钮不可用")
$HWND = DllCall("User32.dll","HANDLE","GetSystemMenu","HWND",$Form,"BOOL",False) ;得到菜单句柄
DllCall("User32.dll","bool","RemoveMenu","handle",$HWND,"uint",$SC_CLOSE,"uint",$MF_REMOVE)

GUISetState()
Do
Until GUIGetMsg() = -3


#include <WindowsConstants.au3>
GUICreate('无边框', Default, Default, Default, Default,BitOR($WS_SYSMENU, $WS_POPUP))
GUISetState()
Do
Until GUIGetMsg() = -3



#Include <WinAPI.au3>
#Include <WinAPIEx.au3>
#Include <WindowsConstants.au3>

$hForm = GUICreate('无控制菜单',Default,Default,Default,Default, BitOR($WS_CAPTION, $WS_POPUP, $WS_SYSMENU), $WS_EX_DLGMODALFRAME)
_WinAPI_DestroyIcon(_WinAPI_GetClassLongEx($hForm, $GCL_HICON))
_WinAPI_SetClassLongEx($hForm, $GCL_HICON, 0)
_WinAPI_SetClassLongEx($hForm, $GCL_HICONSM, 0)
GUISetState()

Do
Until GUIGetMsg() = -3



GUICreate("我不会在任务栏显示", 400, 300, -1, -1, -1, -1, WinGetHandle(AutoItWinGetTitle()))
GUISetState()

Do
Until GUIGetMsg() = -3

xianhou 发表于 2010-11-13 10:09:23

好,直观感受。

lpxx 发表于 2010-11-13 11:20:23

也在KODA编辑器中窗口属性下面可以设置查看效果

飘云 发表于 2010-11-13 12:36:30

好东西,留个位置,以后需要了好找,嘿嘿

zjg2003 发表于 2010-11-13 17:18:00

做个计号先

chenronting 发表于 2010-11-13 19:50:59

哈哈,这东西好,真好用得上, 谢谢。

jonyzhr 发表于 2010-11-13 20:41:30

这个不错呢,留脚收藏

laomao127 发表于 2010-11-13 21:33:51

好东西,留个位置,以后需要了好找,嘿嘿

d5121226 发表于 2010-11-13 22:28:53

呵呵,绝对值得收藏啊。。

qq342252004 发表于 2010-11-14 07:58:10

做个记号,以后用到方便查找。

winding395 发表于 2010-11-15 21:20:01

不错.....好.

menfan1 发表于 2010-11-16 09:11:51

收下,备用,呵呵

tangcengfe 发表于 2010-11-19 19:28:29

学习了,支持楼主!

wanghong01 发表于 2010-11-20 03:29:26

学习了。。。。
{:face (301):}

styledream 发表于 2010-12-15 17:42:40

这个一定要收藏了~~~
一直被窗口的标题样子搞得很乱,楼主帮大忙了~~~
页: [1] 2 3 4 5 6 7 8 9
查看完整版本: 窗口标题样式例子