Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/01/2018 in all areas

  1. Hi, and welcome to the forums. Generally, you would use _IEFormElementCheckBoxSelect to check / uncheck a checkbox element. Beyond that, I didn't really understand your requirements, so I'm unsure how to help you further.
    1 point
  2. No, I'm not working on these multi-line listview items right now. But with the code here I'll never be able to help you with your problem. My listview is a custom drawn listview based on $NM_CUSTOMDRAW notifications contained in $WM_NOTIFY messages. To solve your problem with rows of different heights, you need an owner drawn listview based on $WM_MEASUREITEM messages to define the height of the rows and $WM_DRAWITEM messages to draw the contents of the rows. I think you should ask a question in one of the help forums. There is definitely someone who can help you. Maybe I'll look at the problem myself.
    1 point
  3. I spent a good part of a day looking for the solution, but I could not have done it if I did not have help from other previous AutoIteers posting so in the spirit of caring is sharing , here is working code #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Misc.au3> $Form1 = GUICreate("Form1", 615, 437, 192, 124) $input = GUICtrlCreateInput("Command", 5, 5, 190, 17) GUISetState(@SW_SHOW) ; trap some events not handled by main event loop GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit ; Case $input ; note - I have omitted checking for change event here - done in the WM_Command Function!! ; DoCmd() EndSwitch WEnd Func DoCmd() MsgBox(0,'',"Ya ya - we are here - doing command " & guictrlread($input)) EndFunc Func WM_COMMAND($hWnd, $msg, $wParam, $lParam) Local $nNotifyCode = BitShift($wParam, 16) Local $nID = BitAND($wParam, 0x0000FFFF) if $nID = $input Then ; change event on input if _IsPressed('0D') THEN ; enter was pressed, respond DoCmd() endif return endif if _GuiCtrlGetFocus($Form1) = $input Then ; we are on the input field and no change was made ; see if the enter key was pressed if _IsPressed('0D') THEN ; yes, it was pressed, respond DoCmd() endif endif EndFunc Func _GuiCtrlGetFocus($GuiRef) Local $hwnd = ControlGetHandle($GuiRef, "", ControlGetFocus($GuiRef)) Local $result = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hwnd) Return $result[0] EndFunc
    1 point
×
×
  • Create New...