PantZ4 Posted October 12, 2007 Share Posted October 12, 2007 I have a smaller problem. It seems that every time I set that I want a third part in my statusbar (The middle part) it either removes all the part, besides the first one, or remove the middle part. Maybe somebody can point out what I'm doing wrong? expandcollapse popup#include <GUIConstants.au3> #include <GUIEdit.au3> $GUIWIDTH = 546 $GUIHEIGHT = 394 Local $GUIStatusBarPartLenght[3] = [150, 200, -1] Local $GUIStatusBarPartText[3] = ["Command: ", "Press F1 for help", "Donate to AutoIt!"] $GUI = GUICreate("TestGUI",$GUIWIDTH,$GUIHEIGHT,-1,-1,$WS_SIZEBOX+$WS_MINIMIZEBOX+$WS_MAXIMIZEBOX) GUIRegisterMsg(0x24, "_GUISetResizing") GUICtrlCreateEdit("",-1,99,$GUIWIDTH+1,$GUIHEIGHT-150,$ES_MULTILINE+$ES_READONLY+$WS_VSCROLL) GUICtrlSetBkColor(-1,0xFFFFFF) GUICtrlSetResizing(-1,$GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM) $GUIStatusBar = _GUICtrlStatusBarCreate ($GUI, $GUIStatusBarPartLenght, $GUIStatusBarPartText) ;_GUICtrlStatusBarSetIcon($GUIStatusBar, 2, "C:\Documents and Settings\****\Skrivebord\donate.ico",0) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_RESIZED $a_GUISize = WinGetPos($GUI) $GUIStatusBarPartLenght[0] = (($a_GUISize[2]/100)*50) $GUIStatusBarPartLenght[1] = (($a_GUISize[2]/100)*25) _GUICtrlStatusBarSetParts($GUI, $GUIStatusBar, 3, $GUIStatusBarPartLenght) _GUICtrlStatusBarResize ($GUIStatusBar) Case $msg = $GUI_EVENT_MAXIMIZE _GUICtrlStatusBarResize ($GUIStatusBar) Case $msg = $GUI_EVENT_RESTORE _GUICtrlStatusBarResize ($GUIStatusBar) Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect Sleep(10) WEnd Func _GUISetResizing($hWnd, $Msg, $wParam, $lParam) $dllstruct = DllStructCreate("int;int;int;int;int;int;int;int;int;int",$lParam) DllStructSetData($dllstruct,7,552) DllStructSetData($dllstruct,8,400) Return 0 EndFunc Link to comment Share on other sites More sharing options...
BrettF Posted October 12, 2007 Share Posted October 12, 2007 I'm not sure I can see the problem. This all works for me? expandcollapse popup#include <GUIConstants.au3> #include <GUIEdit.au3> $GUIWIDTH = 546 $GUIHEIGHT = 394 Local $GUIStatusBarPartLenght[3] = [150, 250, -1]; I changed it to be slightly larger (50px) Local $GUIStatusBarPartText[3] = ["Command: ", "Press F1 for help", "Donate to AutoIt!"] $GUI = GUICreate("TestGUI",$GUIWIDTH,$GUIHEIGHT,-1,-1,$WS_SIZEBOX+$WS_MINIMIZEBOX+$WS_MAXIMIZEBOX) GUIRegisterMsg(0x24, "_GUISetResizing") GUICtrlCreateEdit("",-1,99,$GUIWIDTH+1,$GUIHEIGHT-150,$ES_MULTILINE+$ES_READONLY+$WS_VSCROLL) GUICtrlSetBkColor(-1,0xFFFFFF) GUICtrlSetResizing(-1,$GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM) $GUIStatusBar = _GUICtrlStatusBarCreate ($GUI, $GUIStatusBarPartLenght, $GUIStatusBarPartText) ;_GUICtrlStatusBarSetIcon($GUIStatusBar, 2, "C:\Documents and Settings\****\Skrivebord\donate.ico",0) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_RESIZED $a_GUISize = WinGetPos($GUI) $GUIStatusBarPartLenght[0] = (($a_GUISize[2]/100)*50) $GUIStatusBarPartLenght[1] = (($a_GUISize[2]/100)*25) _GUICtrlStatusBarSetParts($GUI, $GUIStatusBar, 3, $GUIStatusBarPartLenght) _GUICtrlStatusBarResize ($GUIStatusBar) Case $msg = $GUI_EVENT_MAXIMIZE _GUICtrlStatusBarResize ($GUIStatusBar) Case $msg = $GUI_EVENT_RESTORE _GUICtrlStatusBarResize ($GUIStatusBar) Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect Sleep(10) WEnd Func _GUISetResizing($hWnd, $Msg, $wParam, $lParam) $dllstruct = DllStructCreate("int;int;int;int;int;int;int;int;int;int",$lParam) DllStructSetData($dllstruct,7,552) DllStructSetData($dllstruct,8,400) Return 0 EndFunc Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
PantZ4 Posted October 12, 2007 Author Share Posted October 12, 2007 Try resize it. All of sudden the middle part is gone. Link to comment Share on other sites More sharing options...
BrettF Posted October 12, 2007 Share Posted October 12, 2007 I think you forgot to add the size for the third... expandcollapse popup#include <GUIConstants.au3> #include <GUIEdit.au3> $GUIWIDTH = 546 $GUIHEIGHT = 394 Local $GUIStatusBarPartLenght[3] = [150, 250, -1]; I changed it to be slightly larger (50px) Local $GUIStatusBarPartText[3] = ["Command: ", "Press F1 for help", "Donate to AutoIt!"] $GUI = GUICreate("TestGUI",$GUIWIDTH,$GUIHEIGHT,-1,-1,$WS_SIZEBOX+$WS_MINIMIZEBOX+$WS_MAXIMIZEBOX) GUIRegisterMsg(0x24, "_GUISetResizing") GUICtrlCreateEdit("",-1,99,$GUIWIDTH+1,$GUIHEIGHT-150,$ES_MULTILINE+$ES_READONLY+$WS_VSCROLL) GUICtrlSetBkColor(-1,0xFFFFFF) GUICtrlSetResizing(-1,$GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM) $GUIStatusBar = _GUICtrlStatusBarCreate ($GUI, $GUIStatusBarPartLenght, $GUIStatusBarPartText) ;_GUICtrlStatusBarSetIcon($GUIStatusBar, 2, "C:\Documents and Settings\****\Skrivebord\donate.ico",0) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_RESIZED $a_GUISize = WinGetPos($GUI) $GUIStatusBarPartLenght[0] = 250 $GUIStatusBarPartLenght[1] = 350 $GUIStatusBarPartLenght[2] = 400 _GUICtrlStatusBarSetParts($GUI, $GUIStatusBar, 3, $GUIStatusBarPartLenght) _GUICtrlStatusBarResize ($GUIStatusBar) Case $msg = $GUI_EVENT_MAXIMIZE _GUICtrlStatusBarResize ($GUIStatusBar) Case $msg = $GUI_EVENT_RESTORE _GUICtrlStatusBarResize ($GUIStatusBar) Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect Sleep(10) WEnd Func _GUISetResizing($hWnd, $Msg, $wParam, $lParam) $dllstruct = DllStructCreate("int;int;int;int;int;int;int;int;int;int",$lParam) DllStructSetData($dllstruct,7,552) DllStructSetData($dllstruct,8,400) Return 0 EndFunc Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
PantZ4 Posted October 12, 2007 Author Share Posted October 12, 2007 *Red ears* :"> Thanks Bert! Link to comment Share on other sites More sharing options...
GaryFrost Posted October 12, 2007 Share Posted October 12, 2007 what you have to remember is the number is not the length of the part, but the right edge of the part so if right edge or the 1st part is 150, then you need the right edge of the second part to be higher than 150, and the 3rd part to be higher than the 2nd part's right edge... SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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