Jump to content

Search the Community

Showing results for tags 'guictrlsendmsg'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. $img = GUICtrlCreatePic("", 500,0,1390,890) ... _GDIPlus_Startup() local $bitmap_1 = _GDIPlus_BitmapCreateFromMemory(InetRead($jpg_url)) local $bitmap_2 = _GDIPlus_ImageResize ($bitmap_1, 1390, 890) local $bitmap_3 = _GDIPlus_BitmapCreateHBITMAPFromBitmap($bitmap_2) GUICtrlSendMsg($img, 0x0172, 0, $bitmap_3) _GDIPlus_BitmapDispose($bitmap_1) _GDIPlus_BitmapDispose($bitmap_2) _WinAPI_DeleteObject($bitmap_3) _GDIPlus_Shutdown() I think this is all the relevant code. I've never worked with any of these functions before (aside from GUICtrlCreatePic and setting it to a picture file, not setting it via memory via GUICtrlSendMsg) so I don't know how to clean up properly after loading/drawing an image to screen. I commented out everything and went line by line figuring out what stops the leak. BitmapDispose and DeleteObject work for the varables I created... $bitmap_1, 2, 3 are good. Now all that remains is the GUICtrlSendMsg line of code. When I comment just this line, the memory leak stops. Do I need to do something to clear the picture control? Or send a message to $img using GUICtrlSendMsg telling it to clear the previous image? The docs for the function don't show anything (https://www.autoitscript.com/autoit3/docs/functions/GUICtrlSendMsg.htm) but I see it's being used to start/stop a marquee scrolling text for a progress bar control with the third parameter value 0/1... I tried this with Pic control thinking making 0 is for displaying the bitmap, and 1 is for clearing it, but it doesn't clear the memory. Help would be appreciated, thanks.
  2. FIrst of all, I apologize for the state of how it all looks as I had to remove thousands of lines to make a workable demo. It works, but it's not pretty. So if you see any inconsistencies just handwave it and they'll go away. 1. First issue is with Global $idPic = GUICtrlCreatePic('', 10, 45, 720, 405) on line 15. It works well however I want to center the image in the control by using $SS_CENTERIMAGE. The moment I add that style and click on a different image the new one simply repaints on top of the old one. Refer to function Func1 for repainting. I could always resize the picture control and place it in the middle based on the bitmap passed but seems like the $SS_CENTERIMAGE is (should be) the perfect solution. 2. Next is the fact that I couldn't find a way to make images scrollable with a horizontal bar only in the list view. Basically one row and infinite columns is what I'd like. I tried formatting the list with with just 1 item and all the rest are subitems however the images are not displayed. Seems like the isssue is with the _GUICtrlListView_SetView($idListview, 0). Specifically the fact that 0 value refers to large icons and the list is then treated differently. I'm wondering if there are any workarounds or similar solutions. 3. It seems there's a memory leak in function Func1. RAM increases each time a new thumbnail is loaded without releasing the old one when next one is drawn. Any help is much appreciated. Been stuck on couple of these for a few days now.
×
×
  • Create New...