Moderators Melba23 Posted December 28, 2010 Moderators Share Posted December 28, 2010 JohnOne,Thanks for that confirmation. I am still puzzled as to why the WM_NOTIFY handler interfered when it was actually the WM_COMMAND handler that was causing the multiple updates. However, given that the system must have been pretty unstable at that point we should perhaps look no further and just be thankful that the whole thing did not just crash. AuToItItAlIaNlOv3R,Another small thing you might like to change. You have a typo in your WM_NOTIFY handler - use this instead: Switch $iCode Case $LVN_ITEMACTIVATE Local $nmia = DllStructCreate($tagNMITEMACTIVATE, $ilParam) ; You had $lParam here <<<<<<<<<<<<<<<<< $I = DllStructGetData($nmia, "Index") $SomeVariablex = _GUICtrlListView_GetItemTextArray($ListView, $I) ; Then you get a value you can use here <<<<<<<<<<<<< $gMediaObject.URL = $SomeVariablex[2] EndSwitchAll good now? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
AuToItItAlIaNlOv3R Posted December 28, 2010 Author Share Posted December 28, 2010 (edited) @Melba23 Thanks for your excellent work...now it work very well and is incredibly faster ... Just curious, what was wrong? Who caused that problem? Thank's Edited December 28, 2010 by AuToItItAlIaNlOv3R Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 28, 2010 Moderators Share Posted December 28, 2010 AuToItItAlIaNlOv3R,As I explained earlier, you caused it by putting a function which takes some time to run inside a Windows message handler. As Windows is dependent on these messages to run smoothly you should not hold them up any longer than you must. That is why I always recommend just to set a flag within the handler and then action the flag within the idle loop - as in the first solution I suggested. If you want to know a bit more about GUIRegisterMsg and Windows message handlers, I suggest you take a look at the GUIRegisterMsg tutorial in the Wiki where it is all explained in pretty simple terms. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
AuToItItAlIaNlOv3R Posted December 28, 2010 Author Share Posted December 28, 2010 The problem was caused by me ...sure take a look at the GUIRegisterMsg tutorial in the Wiki. Thanks for all P.S. You know an autoit variable to "lock" the width of listview column?...I don't see nothing in Help file. hi! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 28, 2010 Moderators Share Posted December 28, 2010 AuToItItAlIaNlOv3R, You know an autoit variable to "lock" the width of listview column?This is the way to lock the column sizes: #include <GUIConstantsEx.au3> #include <GuiListView.au3> $hGUI = GUICreate("Test", 500, 500) $hListView = GUICtrlCreateListView("col 1|Col 2|Col 3", 10, 10, 480, 280) For $i = 1 To 5 GUICtrlCreateListViewItem("Item " & $i & "|Sub Item 1" & $i & "|SubItem 2" & $i, $hListView) Next ; Set column sizes _GUICtrlListView_SetColumnWidth($hListView, 0, 160) _GUICtrlListView_SetColumnWidth($hListView, 1, 160) _GUICtrlListView_SetColumnWidth($hListView, 2, $LVSCW_AUTOSIZE_USEHEADER ) ; Fix column sizes ControlDisable($hGUI, "", HWnd(_GUICtrlListView_GetHeader($hListView))) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<< GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd You can use ControlEnable to activate the columns again. All clear? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
AuToItItAlIaNlOv3R Posted December 28, 2010 Author Share Posted December 28, 2010 You are my hero x)...All clear =P Hi! 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