dantay9 Posted June 9, 2009 Share Posted June 9, 2009 I am testing a remake of Hot Corners by lekremyelse. I want to use a background, but when I do, the tabs don't show up. I am pretty sure it has something to do with the WM_DRAWITEM function, but I don't know what. Can I have some help here? Link to comment Share on other sites More sharing options...
Valuater Posted June 9, 2009 Share Posted June 9, 2009 I think this is what you wanted... expandcollapse popup#include <ComboConstants.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <GuiMenu.au3> #include <TabConstants.au3> #include "ModernMenuRaw.au3" Opt("TrayIconDebug", 1) GUIRegisterMsg($WM_DRAWITEM, "WM_DRAWITEM") Global $Skin = "K:\AutoIt3\Include\Skins\Blackjack" Global Const $ODT_TAB = 101 Global Const $ODA_DRAWENTIRE = 0x1 Global Const $Ini = ".\Configure.ini" Dim $CtrlIDA[1], $CtrlIDB[1], $CtrlButton[1][4], $over_color[1], $btn_color[1], $fnt_color[1] $GUI = GUICreate("Hot Corners", 441, 383) GUISetBkColor("") $Pos = WinGetClientSize($GUI) ;GUICtrlCreatePic(".\Resources\laser web.jpg", 0, 0, $Pos[0], $Pos[1]) ;GUICtrlSetState( -1, $GUI_DISABLE) #Region Create Menu SetOLGreenColors() $FileMenu = GUICtrlCreateMenu("&File") $File_Minimize = _GUICtrlCreateODMenuItem("&Minimize to Tray", $FileMenu) $File_Exit = _GUICtrlCreateODMenuItem("&Exit", $FileMenu) $Options_Menu = GUICtrlCreateMenu("&Options") $Options_Settings = _GUICtrlCreateODMenuItem("&Settings", $Options_Menu) $Options_Bug = _GUICtrlCreateODMenuItem("&Bug Report", $Options_Menu) $Help_Menu = GUICtrlCreateMenu("&Help") $Help_Help = _GUICtrlCreateODMenuItem("&Help...", $Help_Menu) #EndRegion Create Menu GUICtrlCreateTab(16, 0, 409, 318, BitOR($TCS_OWNERDRAWFIXED, $TCS_SINGLELINE)) GUICtrlCreateLabel("", 18, 23, 406, 294) GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreatePic(".\Resources\laser web.jpg", 16, 0, $Pos[0], $Pos[1]);409, 318) GUICtrlSetState( -1, $GUI_DISABLE) $Hot_Tab = GUICtrlCreateTabItem("Hot Corners ") $Group_Top_Left = GUICtrlCreateGroup("Top Left", 48, 48, 145, 105) GUICtrlSetBkColor(-1, 0x000000) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Group_Top_Left), "wstr", "", "wstr", "") GUICtrlSetColor(-1, 0x00FF00) GUICtrlCreateIcon(".\Resources\TL.ico", 0, 104, 72, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP)) $Combo_Top_Left = GUICtrlCreateCombo("", 64, 120, 113, 25, BitOR($CBS_DROPDOWNLIST, $CBS_AUTOHSCROLL, $CBS_SORT)) GUICtrlSetData($Combo_Top_Left, "Control Panel|My Documents|Nothing|Run...|Search Google|Show Desktop|Stand By|Lock", _ IniRead($Ini, "Corners", "Top Left", "Nothing")) $Group_Top_Right = GUICtrlCreateGroup("Top Right", 248, 48, 145, 105) GUICtrlSetBkColor(-1, 0x000000) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Group_Top_Right), "wstr", "", "wstr", "") GUICtrlSetColor(-1, 0x00FF00) GUICtrlCreateIcon(".\Resources\TR.ico", 0, 304, 72, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP)) $Combo_Top_Right = GUICtrlCreateCombo("", 264, 120, 113, 25, BitOR($CBS_AUTOHSCROLL, $CBS_DROPDOWNLIST, $CBS_SORT)) GUICtrlSetData($Combo_Top_Right, "Control Panel|My Documents|Nothing|Run...|Search Google|Show Desktop|Stand By|Lock", _ IniRead($Ini, "Corners", "Top Left", "Nothing")) $Group_Bottom_Left = GUICtrlCreateGroup("Bottom Left", 48, 176, 145, 105) GUICtrlSetBkColor(-1, 0x000000) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Group_Bottom_Left), "wstr", "", "wstr", "") GUICtrlSetColor(-1, 0x00FF00) GUICtrlCreateIcon(".\Resources\BL.ico", 0, 104, 200, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP)) $Combo_Bottom_Left = GUICtrlCreateCombo("", 64, 248, 113, 25, BitOR($CBS_AUTOHSCROLL, $CBS_DROPDOWNLIST, $CBS_SORT)) GUICtrlSetData($Combo_Bottom_Left, "Control Panel|My Documents|Nothing|Run...|Search Google|Show Desktop|Stand By|Lock", _ IniRead($Ini, "Corners", "Bottom Left", "Nothing")) $Group_Bottom_Right = GUICtrlCreateGroup("Bottom Right", 248, 176, 145, 105) GUICtrlSetBkColor(-1, 0x000000) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Group_Bottom_Right), "wstr", "", "wstr", "") GUICtrlSetColor(-1, 0x00FF00) GUICtrlCreateIcon(".\Resources\BR.ico", 0, 304, 200, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP)) $Combo_Bottom_Right = GUICtrlCreateCombo("", 264, 246, 113, 25, BitOR($CBS_AUTOHSCROLL, $CBS_DROPDOWNLIST, $CBS_SORT)) GUICtrlSetData($Combo_Bottom_Right, "Control Panel|My Documents|Nothing|Run...|Search Google|Show Desktop|Stand By|Lock", _ IniRead($Ini, "Corners", "Bottom Right", "Nothing")) GUICtrlCreateTabItem("") $Mouse_Tab = GUICtrlCreateTabItem("Mouse Gestures") $Mouse_Up = GUICtrlCreateGroup("Mouse Up", 160, 40, 121, 105) GUICtrlSetBkColor(-1, 0x000000) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Mouse_Up), "wstr", "", "wstr", "") GUICtrlSetColor(-1, 0x00FF00) GUICtrlCreateIcon(".\Resources\UP.ico", 0, 200, 64, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP)) $Combo_Mouse_Up = GUICtrlCreateCombo("", 172, 111, 97, 25, BitOR($CBS_AUTOHSCROLL, $CBS_DROPDOWNLIST, $CBS_SORT)) GUICtrlSetData(-1, "Control Panel|My Documents|Nothing|Run...|Search Google|Show Desktop|Stand By|Lock", _ IniRead($Ini, "Mouse", "Mouse Up", "Nothing")) $Mouse_Left = GUICtrlCreateGroup("Mouse Left", 32, 104, 121, 105) GUICtrlCreateIcon(".\Resources\LF.ico", 0, 72, 128, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP)) $Combo_Mouse_Left = GUICtrlCreateCombo("", 44, 175, 97, 25, BitOR($CBS_AUTOHSCROLL, $CBS_DROPDOWNLIST, $CBS_SORT)) GUICtrlSetData(-1, "Control Panel|My Documents|Nothing|Run...|Search Google|Show Desktop|Stand By|Lock", _ IniRead($Ini, "Mouse", "Mouse Left", "Nothing")) $Mouse_Down = GUICtrlCreateGroup("Mouse Down", 160, 184, 121, 105) GUICtrlCreateIcon(".\Resources\DN.ico", 0, 200, 208, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP)) $Combo_Mouse_Down = GUICtrlCreateCombo("", 172, 255, 97, 25, BitOR($CBS_AUTOHSCROLL, $CBS_DROPDOWNLIST, $CBS_SORT)) GUICtrlSetData(-1, "Control Panel|My Documents|Nothing|Run...|Search Google|Show Desktop|Stand By|Lock", _ IniRead($Ini, "Mouse", "Mouse Down", "Nothing")) $Mouse_Right = GUICtrlCreateGroup("Mouse Right", 288, 104, 121, 105) GUICtrlCreateIcon(".\Resources\RT.ico", 0, 328, 128, 32, 32, BitOR($SS_NOTIFY, $WS_GROUP)) $Combo_Mouse_Right = GUICtrlCreateCombo("", 300, 175, 97, 25, BitOR($CBS_AUTOHSCROLL, $CBS_DROPDOWNLIST, $CBS_SORT)) GUICtrlSetData(-1, "Control Panel|My Documents|Nothing|Run...|Search Google|Show Desktop|Stand By|Lock", _ IniRead($Ini, "Mouse", "Mouse Right", "Nothing")) GUICtrlCreateTabItem("") $Button_OK = XSkinButton("&OK", 154, 328, 75, 25, $Skin) $Button_Cancel = XSkinButton("&Cancel", 254, 328, 75, 25, $Skin) GUISetState() Send("{RIGHT}") Send("{LEFT}") While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE, $File_Exit Exit Case $File_Minimize GUISetState(@SW_HIDE, $GUI) EndSwitch Switch MouseOver() Case $Button_OK, $Button_Cancel Exit EndSwitch Sleep(5) WEnd 8) Link to comment Share on other sites More sharing options...
Valuater Posted June 9, 2009 Share Posted June 9, 2009 Is that what you were looking for ? 8) Link to comment Share on other sites More sharing options...
dantay9 Posted June 10, 2009 Author Share Posted June 10, 2009 Yeah that was it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now