mike1950r Posted May 18, 2021 Share Posted May 18, 2021 (edited) Hi, I have a problem with the scrollbar in edit control. In my case I use richedit, but it appears also in the "normal" editcontrol. The problem ONLY appears, when working with my program (including editcontrol) and another program like notpad on the other screen. It appears when using the scrollbar of notepad, then my scroll bar and so on ... (vertical scrollbars only) and then suddenly the area behind my scrollbar gets highlighted (black) like selected, above and below, if i move the mouse to the left during pressing, the whole area behind the scrollbar gets highlighted in black. When my program is loaded alone the problem NEVER happens. I have made two screenshots, 1st one when the problem appears, and the second one showing when moving to the left. I really have no idea and there is nothing special in my editcontrol. I would be really thankful, if someone could help me further to get this issue solved. thanks in advance cheers mike Edited May 18, 2021 by mike1950r Link to comment Share on other sites More sharing options...
mike1950r Posted May 19, 2021 Author Share Posted May 19, 2021 hi, is there any chance perhaps to help with this very annoying problem? as far as i've tested this only occurs in a minimum 2 screens setup. easy to test one screen the autoit editcontrol and on the other one notepad. just scroll on both for a while. thanks mike Link to comment Share on other sites More sharing options...
argumentum Posted May 19, 2021 Share Posted May 19, 2021 On 5/18/2021 at 11:31 AM, mike1950r said: I have made two screenshots Good color balance in those screenshots. So...., where's the code ?. Is it a code problem or a picture problem ? Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
mike1950r Posted May 19, 2021 Author Share Posted May 19, 2021 2 hours ago, argumentum said: Good color balance in those screenshots. So...., where's the code ?. Is it a code problem or a picture problem ? Hi, thanks for your answer. it's a bit complicate to post the code, cause it contents a lot of stuff of my personal library. i tried to reduce it to the minimum and i got the impression,. that this reduces the error cases. so i think it's just a memory problem between the open editor programs at the same time. i try to get more light into this and find out, where i can reduce code to eliminate errors. the question is, how i can focus on the activated editor and release the memory for the other at that moment, say switching between the programs.. cheers mike Link to comment Share on other sites More sharing options...
mike1950r Posted May 25, 2021 Author Share Posted May 25, 2021 Hi again, i've testing a while for this really strange issue. i'm pretty sure that this is no code problem, cause it's working without any problems when working only on one screen. if i work on two screens, say my program on first screen and for example notepad on second screen, the problem occurs. but if i minimize notepad on second screen, the problem does not occur anymore. this is reproducable. if someone could help me further, this would really be great. thank you mike Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 25, 2021 Moderators Share Posted May 25, 2021 mike1950r, Quote if someone could help me I would not hold your breath. You are running a completely unknown script which only glitches on a two-screen setup, which is not that common. Not exactly a great deal to go on, is it? 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...
mike1950r Posted May 25, 2021 Author Share Posted May 25, 2021 Hi Melba, i tried to find out where the problem comes from and removed features of my program until it does not make the problem anymore. as far as i found: when i remove the context menu part, the edit control seems to run without glitches. so i attach this part as bug.au3. may be someone could have a look into and see what the problem is. thanks in advance. cheers mike bug.au3 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 25, 2021 Moderators Share Posted May 25, 2021 mike1950r, Any particular reason why you are subclassing the edit control to use the context menu rather then using the (IMO) simpler Windows messaging method used in the example for _GUICtrlMenu_TrackPopupMenu in the Help file? Personally I avoid subclassing like the plague unless I absolutely have to use it to solve a particular problem. 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...
mike1950r Posted May 25, 2021 Author Share Posted May 25, 2021 Hi again, i rewrote the context to fit your propose. the problem is, that the context menu only is displayed if i right click in the area of the menubar of the parent of the richedit control. i need it to be displayed when clicking inside the richedit control, to select something and right click on copy for example. with my procedure like in the attached file this was working fine. (but it created the glitches as reported) it was the only example i found, which was working. so what can i do? cheers mike Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 26, 2021 Moderators Share Posted May 26, 2021 mike1950r, I found the script from which you copied your code and it does seem that subclassing is necessary for any form of Edit control context menus because of the existing system context menus. But I am at a loss as to why doing this would cause the problem you see with the scrollbars, so I do not think I can help any further - sorry. 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...
mike1950r Posted May 26, 2021 Author Share Posted May 26, 2021 Hi Melba, i was thinking for a solution, and found one. i attach it as file. It's working exellent and there are no more glitches. i splitted the other one in to different procedures command and notify. Think this can help other users for the context in richedit without glitches. thanks for everybody, who tried to help. cheers mike context.au3 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 26, 2021 Moderators Share Posted May 26, 2021 mike1950r, Well done! Always satisfying to get a solution yourself. 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...
mike1950r Posted May 26, 2021 Author Share Posted May 26, 2021 😉 Link to comment Share on other sites More sharing options...
mike1950r Posted May 26, 2021 Author Share Posted May 26, 2021 For those, who want also detect select change, edit change and doubleclick here is this included additionally. cheers mike context+.au3 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