suthers Posted November 12, 2008 Share Posted November 12, 2008 Hi All, My GUI App has Pic controls created by GuiCtrlCreatePic(). Their content can be selected by the user clicking on radio buttons. It was previously compiled under V3.2.1.4 and worked. Running or compiling under Beta V3.2.13.9 the images become corrupted when GUICtrlSetImage() is called to change them. Pixels are missing, carried over from the previous image, etc. Multiple changes of image don't help. The corruptions are reproducable, not random. If the GUI window is hidden, then shown, or minimised then maximised, then the corruptions disapear....until the next time GUICtrlSetImage() is called to change them and then they corrupt again. The full script is 1168 lines long and won't work outside its installation environment, so I'll post snippits below. If the full code would be useful I can send it directly to interested parties. ;control creation $30DayImagePicID = GUICtrlCreatePic(@ScriptDir & "\gold30dayinit.gif", $30DayImageLeftAlign, $TopAlignGraph30Day, 250, 155) $LiveImagePicID = GUICtrlCreatePic(@ScriptDir & "\goldliveinit.gif", $LiveImageLeftAlign, $TopAlignGraphLive, 640, 400) ;image changing - this function is called when the user changes the radio buttons in the GUI Func UpdateGUIWithNewGraphs() If $ActiveGraphType = "gold" Then GUICtrlSetImage($30DayImagePicID, $GraphGold30dayFileAndPath) GUICtrlSetImage($LiveImagePicID, $GraphGoldLiveFileAndPath) FixCorruptedPicControls(); my workaround Else GUICtrlSetImage($30DayImagePicID, $GraphSilver30dayFileAndPath) GUICtrlSetImage($LiveImagePicID, $GraphSilverLiveFileAndPath) FixCorruptedPicControls(); my workaround EndIf EndFunc ;==>UpdateGUIWithNewGraphs Func FixCorruptedPicControls(); this is my workaround for the new unicode autoit version which corrupts the image pic controls when changing pics GUISetState (@SW_HIDE,$MainGUIHandle) GUISetState (@SW_SHOW,$MainGUIHandle) EndFunc The workaround is not satisfactory as it introduces a BIG flicker (obviously). Ideas? Shalom Bill Link to comment Share on other sites More sharing options...
rasim Posted November 12, 2008 Share Posted November 12, 2008 suthersFrom help:If a picture is set as a background picture, as the other controls will overlap, it's important to disable the pic control: GuiCtrlSetState(-1,$GUI_DISABLE). Link to comment Share on other sites More sharing options...
suthers Posted November 12, 2008 Author Share Posted November 12, 2008 suthersIt's not a background picture. They are actually being used as controls. They are clickable and trigger events. And there is no overlap with other controls. Link to comment Share on other sites More sharing options...
rasim Posted November 12, 2008 Share Posted November 12, 2008 It's not a background picture. They are actually being used as controls. They are clickable and trigger events. And there is no overlap with other controls.Can you post a small and working example to duplicate the problem? Link to comment Share on other sites More sharing options...
suthers Posted November 12, 2008 Author Share Posted November 12, 2008 (edited) Can you post a small and working example to duplicate the problem?Mmmm...have thought about that and shuddered at trying to trim the code down to something neat & small. How do I include the images for the pic controls in the post? I'm at work at the moment, so no chance right now.... Edited November 12, 2008 by suthers Link to comment Share on other sites More sharing options...
suthers Posted November 12, 2008 Author Share Posted November 12, 2008 Here's a screenshot of it to give you an idea what it's doing. The pic controls are the 2 graphs.http://shalom.110mb.com/Image.html Link to comment Share on other sites More sharing options...
Sundance Posted November 13, 2008 Share Posted November 13, 2008 Could be this can help you:http://www.autoitscript.com/forum/index.ph...c=83233&hl=Or you can try the _WinAPI_RedrawWindow command with the coordinates of the changed pic controlgreetzSundance Link to comment Share on other sites More sharing options...
suthers Posted November 13, 2008 Author Share Posted November 13, 2008 Oh Wow Sundance :-) That looks like just what I need! I'll try it out & post back results. Give me a few days.... 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