Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/23/2020 in all areas

  1. [New Version] - 16 Apr 2022 Added: A new function _GUIExtender_Hidden_Control which allows you to specify which controls should not be automatically reshown when it redraws the GUI. You no longer need to hide/show the control within the script - this function does that as well as telling the UDF whether or not to show it on redraw. New UDF and an additional example in the zip below. Previous changes: Changelog.txt ........................................................................... The GUIExtender UDF allows you to have multiple sections within your GUIs which can be either static or extendable. The extendable sections can be extended and retracted either by UDF created buttons or programmatically by other controls or HotKeys. The controls on the sections are fully functional and there is no overlap problem when retracted (see the details section if you want to know how). The UDF can be used in both MessageLoop and OnEvent modes and with both native and UDF created controls, as well as embedded objects and child GUIs. -------------------------------------------------------------- Note: This is a new recoded and (I hope) simplified version of my earlier UDF of the same name. If you move to this new version there are several script-breaking changes, so please look carefully at the included example scripts to see where things have changed. Here is a quick guide to how the UDF function list has been altered: Old function New function Comment _Init _Init Unchanged _Clear _Clear Unchanged _Section_Start _Section_Create New default parameters for position and size _Section_End Deprecated _Section_Create used to end all section creation _Section_Action _Section_Activate Simple rename _Action _EventMonitor Simple rename _Section_Extend _Section_Action Simple rename, but now uses integer parameter for required state _Section_State _Section_State Unchanged _Restore Deprecated Now automatic _ActionCheck Deprecated Now automatic _HandleCheck Deprecated Now automatic _Obj_Data _Obj_Data Unchanged - _Handle_Data Single call on creation replaces multiple _HandleCheck calls Note: The _EventMonitor function must be added to the idle loop for the automatic actions above to occur -------------------------------------------------------------- Details of how the UDF works for those who are interested: The UDF and plenty of commented examples are in the attached zip: GUIExtender.zip M23
    1 point
  2. I think that the explanation lies somewhere under this statement from MSDN : In case of an inquiry, the parent also needs to know the given DC of the control, which makes sense. But the window itself doesn't need its own DC to get its bk color. #include <WinAPI.au3> #include <WindowsConstants.au3> Global $hGui = GUICreate("Demo for GUICtrlGetBKColor", 578, 323) GUISetBkColor (0xFFFF00) Global $idBtn = GUICtrlCreateButton("Test", 64, 64, 89, 33) GUICtrlSetBkColor(-1, 0x00FFFF) GUISetState () ConsoleWrite ("control = " & Hex(_GUICtrlGetBkColor($idBtn)) & @CRLF) Local $hGuiDC = _WinAPI_GetDC($hGUI) Local $iGetColor = _WinAPI_GetBkColor($hGuiDC) _WinAPI_ReleaseDC($hGUI, $hGuiDC) ConsoleWrite ("GUI = " & Hex($iGetColor) & @CRLF) Sleep (1000) Func _GUICtrlGetBkColor($hWnd) If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd) Local $hParent = _WinAPI_GetParent($hWnd) Local $hDC = _WinAPI_GetDC($hWnd) _SendMessage($hParent, $WM_CTLCOLORSTATIC, $hDC, $hWnd) Local $RGB = _WinAPI_GetBkColor($hDC) _WinAPI_ReleaseDC($hWnd, $hDC) Return $RGB EndFunc ;==>_GUICtrlGetBkColor
    1 point
  3. .... Wait a moment, I must be a little dazed I confused the X Y coordinates of the lower right corner with the height and width dimensions of the rectangle to get the width and height of the work area I have to subtract the X and Y coordinates .... I need double coffees. .... my apologies for the banality
    1 point
  4. Melba23

    IPC with autoit

    kylejustknows, 14 years on I doubt if the OP is still interested! And nowadays there are quite a few very reliable IPC UDFs available, as listed here. M23
    1 point
  5. DeSwa, Then you need to use _GUICtrlListView_EnsureVisible with the index of the new item. M23
    1 point
×
×
  • Create New...