Opened 16 years ago
Closed 16 years ago
#735 closed Bug (No Bug)
Resizing GUI after _GUICtrlStatusBar_EmbedControl() causes control to disappear
Reported by: | PsaltyDS | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.2.12.1 | Severity: | None |
Keywords: | Cc: |
Description
Ref: [Trac #45]
An embedded progress bar control embedded with _GUICtrlStatusBar_EmbedControl() will disappear when the GUI is re-sized. This was previously reported, and it was also reported that if the progress was a marquee type it could also crash.
While the crash issue with the marquee progress bar was discussed and dismissed as not being AutoIt's problem, the original complaint that an ordinary progress control disappears when the the window is re-sized did not get addressed.
Users are still running into and seeking a solution for the original issue (aside from the crash with the marquee type). Even completely destroying and recreating the progress bars and status bar on re-size still won't display them (3.2.12.1 and 3.2.13.11).
#include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <WindowsConstants.au3> Global $Form1, $hStatusBar, $progress, $hProgress, $progress2, $hProgress2 Global $StatusBar1_PartsWidth[3] = [100, 200, 250] $Form1 = GUICreate("Form1", 401, 201, 440, 224, BitOR($WS_THICKFRAME, _ $WS_SYSMENU, $WS_CAPTION, $WS_POPUP)) _StatusBarUpdate() GUIRegisterMsg($WM_SIZE, "WM_SIZE") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func WM_SIZE($hWnd, $iMsg, $iwParam, $ilParam) _StatusBarUpdate() Return $GUI_RUNDEFMSG EndFunc ;==>WM_SIZE Func _StatusBarUpdate() ConsoleWrite("Debug: Updating statusbar" & @LF) GUICtrlDelete($progress) GUICtrlDelete($progress2) _GUICtrlStatusBar_Destroy($hStatusBar) $hStatusBar = _GUICtrlStatusBar_Create($Form1) _GUICtrlStatusBar_SetParts($hStatusBar, $StatusBar1_PartsWidth) _GUICtrlStatusBar_SetText($hStatusBar, "Ready", 0) $progress = GUICtrlCreateProgress(0, 0, -1, -1) $hProgress = GUICtrlGetHandle($progress) _GUICtrlStatusBar_EmbedControl($hStatusBar, 1, $hProgress) $progress2 = GUICtrlCreateProgress(0, 0, -1, -1) $hProgress2 = GUICtrlGetHandle($progress2) _GUICtrlStatusBar_EmbedControl($hStatusBar, 2, $hProgress2) EndFunc ;==>_StatusBarUpdate
Attachments (0)
Change History (1)
comment:1 Changed 16 years ago by Gary
- Resolution set to No Bug
- Status changed from new to closed
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.
Still not a bug with the embed function.
Work around if embedding controls in status bar and using WM_SIZE: