Opened 9 years ago

Closed 5 years ago

#2962 closed Bug (Fixed)

GUICtrlSetImage resizes Pic control with $SS_SUNKEN style

Reported by: MrCreatoR Owned by: Jos
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


Reproducing example:

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$hGUI = GUICreate("Test Script", 300, 200)

$sImage = @AutoItExe & "\..\Examples\GUI\mslogo.jpg"
$iPic = GUICtrlCreatePic($sImage, 20, 40, 100, 30, $SS_SUNKEN)
;$iPic = GUICtrlCreatePic($sImage, 20, 40, 100, 30, -1, $WS_EX_DLGMODALFRAME)

GUISetState(@SW_SHOW, $hGUI)

For $i = 1 To 10
    GUICtrlSetImage($iPic, $sImage)

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE

the size of the pic control (with $SS_SUNKEN style or $WS_EX_DLGMODALFRAME exstyle or some other styles) changes when we use GUICtrlSetImage.
If we add $SS_CENTERIMAGE style then this will solve the issue, but i think it shouldn't happen.

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by MrCreatoR the same.
5 years... any chance for a fix?

comment:2 Changed 5 years ago by Jos

  • Milestone set to
  • Owner set to Jos
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [12223] in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jos.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.