Jump to content
Sign in to follow this  
Skyfree

There may be a bug in _GUICtrlStatusBar_Create

Recommended Posts

Skyfree

autoit v3.3.10.2

this code:

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

#Region
Local $Form1 = GUICreate("Form1", 300, 200)
Local $MenuItem1 = GUICtrlCreateMenu("MenuItem1")
Local $MenuItem2 = GUICtrlCreateMenuItem("MenuItem2", $MenuItem1)
Local $MenuItem3 = GUICtrlCreateMenuItem("MenuItem3", $MenuItem1)
Local $MenuItem4 = GUICtrlCreateMenu("MenuItem4")
Local $MenuItem5 = GUICtrlCreateMenuItem("MenuItem5", $MenuItem4)

Local $StatusBar1 = _GUICtrlStatusBar_Create($Form1)
Local $StatusBar1_PartsWidth[2] = [260, -1]
_GUICtrlStatusBar_SetParts($StatusBar1, $StatusBar1_PartsWidth)
_GUICtrlStatusBar_SetText($StatusBar1, "Text1", 0)
_GUICtrlStatusBar_SetText($StatusBar1, "Text2", 1)
_GUICtrlStatusBar_SetMinHeight($StatusBar1, 17)

GUISetState(@SW_SHOW)
#EndRegion

Local $nMsg
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

run:

post-84231-0-20333300-1395746102_thumb.j

so ,where is the StatusBar??

but this code:

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

#Region
Local $Form1 = GUICreate("Form1", 300, 200)
Local $MenuItem1 = GUICtrlCreateMenu("MenuItem1")
Local $MenuItem2 = GUICtrlCreateMenuItem("MenuItem2", $MenuItem1)
GUICtrlSetState(-1, $GUI_FOCUS)
Local $MenuItem3 = GUICtrlCreateMenuItem("MenuItem3", $MenuItem1)
Local $MenuItem4 = GUICtrlCreateMenu("MenuItem4")
Local $MenuItem5 = GUICtrlCreateMenuItem("MenuItem5", $MenuItem4)

Local $StatusBar1 = _GUICtrlStatusBar_Create($Form1)
Local $StatusBar1_PartsWidth[2] = [260, -1]
_GUICtrlStatusBar_SetParts($StatusBar1, $StatusBar1_PartsWidth)
_GUICtrlStatusBar_SetText($StatusBar1, "Text1", 0)
_GUICtrlStatusBar_SetText($StatusBar1, "Text2", 1)
_GUICtrlStatusBar_SetMinHeight($StatusBar1, 17)

GUISetState(@SW_SHOW)
#EndRegion

Local $nMsg
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

run:

post-84231-0-88180800-1395746104_thumb.j

StatusBar appeared !!

is this a bug of _GUICtrlStatusBar_Create?

Edited by Skyfree

Share this post


Link to post
Share on other sites
Melba23

Skyfree,

Yes.  Although not quite the same thing, I reported a similar problem at #2588.  I will add a link to this thread as well. :)

 

M23

Edit: Ticket amended. :)

Edited by Melba23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
czyt

congratulation!may this problem be solved in some few days!I haven't use such control yet!


董小姐,你微笑的时候很美,就像安河桥下,清澈的水...

Share this post


Link to post
Share on other sites
FireFox

may this problem be solved in some few days!

Pray, pray.

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×