Jump to content

image limited or not in autoit guis?


tomashen
 Share

Recommended Posts

r they limited or not? :D

because ive got a bar and the bar has about 7 images

and when hovered over each image there are different things dropdowned and each dropdown has about 5 extra buttons.

and because of those dropdowns im loossing some images on the bar... they are just not showing .. just missing ... ;//

Proud of AutoIt Proud of MySelf :)

Link to comment
Share on other sites

Global $WINDOMACVERSION, $APPLICATIONS, $CURSOR_GET_PLACE_ON_BUTTON
;~ Opt("MouseCoordMode", 2)
$WINDOMACVERSION = FileGetVersion("WindoMacBar.exe")

$BAR_GUI = GUICreate("WindoMacBar - " & $WINDOMACVERSION, @DesktopWidth,300,0,0, $WS_POPUP,$WS_EX_LAYERED)
$MAINBK = GUICtrlCreatePic("", 0,0, @DesktopWidth, 300,BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS), $GUI_WS_EX_PARENTDRAG)
GUICtrlSetState(-1, $GUI_DISABLE)
_ResourceSetImageToCtrl($MAINBK, "MAINBK")
;=========================================================================
;=========================================================================
$APPLICATIONS = GUICtrlCreatePic("", 0, 0, 154, 25)
_ResourceSetImageToCtrl($APPLICATIONS, "APPLICATION1")


;~ $APP_1 = GUICtrlCreatePic("", 0, 25, 154, 250)
;~ _ResourceSetImageToCtrl(-1, "BTNAPPBK")
;~ $APP_1 = GUICtrlCreateGraphic(0, 25, 154, 300)
;~ GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x000000, 0x3a3a3a)
;~ GUICtrlSetGraphic(-1, $GUI_GR_RECT, 0, 0, 154, 300)
$APP_1 = GUICtrlCreateButton("Accessories", 0, 25, 154, 20)
;~ GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetBkColor(-1, 0x3a3a3a)
GUICtrlSetState(-1, $GUI_HIDE)
$PLACES = GUICtrlCreatePic("", 154, 0, 114, 25)
_ResourceSetImageToCtrl($PLACES, "PLACE1")

;~ $PLC_1 = GUICtrlCreatePic("", 135, 25, 114, 250)
;~ _ResourceSetImageToCtrl(-1, "BTNPLCBK")
;~ GUICtrlSetState(-1, $GUI_HIDE)
$PLC_1 = GUICtrlCreateButton("Accessories", 154, 25, 114, 20)
;~ GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetBkColor(-1, 0x3a3a3a)
GUICtrlSetState(-1, $GUI_HIDE)
While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit 1
        EndSwitch
    $aMPos = MouseGetPos()
if _WinAPI_PtInRectEx($aMPos[0], $aMPos[1], 0, 0, 154, 250) Then
    $CURSOR_GET_PLACE_ON_BUTTON = GUIGetCursorInfo()
    If IsArray($CURSOR_GET_PLACE_ON_BUTTON) And $CURSOR_GET_PLACE_ON_BUTTON[4] = $APPLICATIONS Then
        If BitAnd(GUICtrlGetState($APP_1), $GUI_HIDE) Then
            GUICtrlSetState($APP_1, $GUI_SHOW)
            GUICtrlSetState($APP_2, $GUI_SHOW)
            GUICtrlSetState($APP_3, $GUI_SHOW)
            GUICtrlSetState($APP_4, $GUI_SHOW)
            GUICtrlSetState($APP_5, $GUI_SHOW)
        EndIf
    EndIf
Else
    If BitAnd(GUICtrlGetState($APP_1), $GUI_SHOW) Then
        GUICtrlSetState($APP_1, $GUI_HIDE)
        GUICtrlSetState($APP_2, $GUI_HIDE)
        GUICtrlSetState($APP_3, $GUI_HIDE)
        GUICtrlSetState($APP_4, $GUI_HIDE)
        GUICtrlSetState($APP_5, $GUI_HIDE)

    EndIf
EndIf
wend
Func _WinAPI_PtInRectEx($iX, $iY, $iLeft, $iTop, $iRight, $iBottom)
    Local $aResult
    Local $tRect = DllStructCreate($tagRECT)
    DllStructSetData($tRect, "Left", $iLeft)
    DllStructSetData($tRect, "Top", $iTop)
    DllStructSetData($tRect, "Right", $iRight)
    DllStructSetData($tRect, "Bottom", $iBottom)
    $aResult = DllCall("User32.dll", "int", "PtInRect", "ptr", DllStructGetPtr($tRect), "int", $iX, "int", $iY)
    If @error Then Return SetError(@error, 0, False)
    Return $aResult[0] <> 0
EndFunc

this is some cuts out of my script.. :D unless u need all of the coe :?

Proud of AutoIt Proud of MySelf :)

Link to comment
Share on other sites

this is some cuts out of my script.. :D unless u need all of the coe :?

Post also all #AutoIt3Wrapper directives especially

#AutoIt3Wrapper_Res_File_Add=...

EDIT: it seems you try to create more overlayed images I don't have experience with this if it works

Edited by Zedna
Link to comment
Share on other sites

#AutoIt3Wrapper_Res_Comment=WindoMacBar developed by SETZ(C) "TomaSz"
#autoit3wrapper_res_description=WindoMacBar designed linux top navigator bar especially for windows OS'es
#AutoIt3Wrapper_Res_Fileversion=1.101.1
#AutoIt3Wrapper_Res_Language=English
#AutoIt3Wrapper_Res_LegalCopyright=TomaSz/fear-x/tomaszzz
#AutoIt3Wrapper_icon=includeimgicon.ico
#AutoIt3Wrapper_UseX64=N

#AutoIt3Wrapper_Res_File_Add=includeimgMAINBK.JPG, rt_rcdata, MAINBK
#AutoIt3Wrapper_Res_File_Add=includeimgAPP1.JPG, rt_rcdata, APPLICATION1
#AutoIt3Wrapper_Res_File_Add=includeimgAPP2.JPG, rt_rcdata, APPLICATION2
#AutoIt3Wrapper_Res_File_Add=includeimgPLC1.jpg, rt_rcdata, PLACE1
#AutoIt3Wrapper_Res_File_Add=includeimgPLC2.jpg, rt_rcdata, PLACE2
#AutoIt3Wrapper_Res_File_Add=includeimgSYS1.jpg, rt_rcdata, SYS1
#AutoIt3Wrapper_Res_File_Add=includeimgSYS2.jpg, rt_rcdata, SYS2
#AutoIt3Wrapper_Res_File_Add=includeimgIE1.jpg, rt_rcdata, IE1
#AutoIt3Wrapper_Res_File_Add=includeimgIE2.jpg, rt_rcdata, IE2
#AutoIt3Wrapper_res_File_Add=includeimgVOL1.jpg, rt_rcdata, VOL1
#AutoIt3Wrapper_res_File_Add=includeimgVOL2.jpg, rt_rcdata, VOL2
#AutoIt3Wrapper_res_File_Add=includeimgPOWER1.jpg, rt_rcdata, POWER1
#AutoIt3Wrapper_res_File_Add=includeimgPOWER2.jpg, rt_rcdata, POWER2
#AutoIt3Wrapper_res_File_Add=includeimgNETWORK1.jpg, rt_rcdata, NETWORK1
#AutoIt3Wrapper_res_File_Add=includeimgNETWORK2.jpg, rt_rcdata, NETWORK2
#AutoIt3Wrapper_res_file_add=includeimgBTNAPPBK.JPG, rt_rcdata, BTNAPPBK
#autoit3wrapper_res_file_add=includeimgBTNPLCBK.JPG, rt_rcdata, BTNPLCBK
#autoit3wrapper_res_file_add=includeimgBTNSYSBK.JPG, rt_rcdata, BTNSYSBK

ok i just tested using images on gui without resource... and setting images with

GuiCtrlCreatePic()
works fine shows every image.. :D

now im gona try using resources but settings not rt_rcdata but bitmap

tested with rt_bitmap.. same thing as with rt_rcdata... gues ill have to use

GuiCtrlCreatePic
Edited by tomashen

Proud of AutoIt Proud of MySelf :)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...