Search the Community
Showing results for tags '$LBN_DBLCLK'.
-
I'm trying to make it so that when I double click an item in my $List1 listbox, it will bring up a GUI window that reads all the .log values into the variable and then displays it in another list inside that child window. It should open a .log file that starts with the computer name ($compName) & ".log". Then read all the lines into a variable called $fread which then after its done reading into the variable it would then put that variable's value inside the list. Then close the file. Do I have the logic correct for doing this. Would my $List1 that I double click have to be able to edit, because that list is $ES_READONLY. ::Here is the GUIRegisterMsg and WM_COMMAND function that I'd like some help with:: GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) Local $Child, $lb, $fopen, $fclose, $fread, $count, $i $iIDFrom = BitAND($wParam, 0xFFFF) ; low word $iCode = BitShift($lParam, 16) ; high word Switch $iCode Case $LBN_DBLCLK ;sent when user double-clicks a string in the list box Switch $iIDFrom Case $List1 $index = _GUICtrlListBox_GetCaretIndex($List1) $sText = _GUICtrlListBox_GetText($List1, $index) $Child = GUICreate($compName, 600, 500, -1, -1, -1, -1, $GUIhandle) $fopen = FileOpen($compName & ".log", 0) $count = _FileCountLines($fopen) for $i = 0 To $count Step 1 $fread &= FileReadLine($fopen, $i) & @CRLF Next $lb = GUICtrlCreateList("", 10, 10, 580, 480, BitOr($WS_BORDER, $WS_VSCROLL), $ES_READONLY) GUICtrlSetData($lb, $fread) $fclose = FileClose($fopen) EndSelect EndSelect EndFunc
- 8 replies
-
- $WM_COMMAND
- $LBN_DBLCLK
-
(and 1 more)
Tagged with: