Custom Query
Results (4 - 6 of 3838)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#9 | Fixed | _GUICtrlRebar_AddToolBarBand(): Button height clipped when Toolbar added to Rebar | Gary | rover |
Description |
Reversed _WinAPI_LoWord and _WinAPI_HiWord for setting rebar height in function _GUICtrlRebar_AddToolBarBand() in include GuiReBar.au3 Reproducer script ; version 3.2.9.10 and 3.2.9.14 #include <GuiConstantsEx.au3> #include <GuiToolbar.au3> #include <GuiReBar.au3> #Include <GuiImageList.au3> Opt('MustDeclareVars', 1) _Main() Func _Main() Local $hGUI, $hToolbar, $hReBar, $btn1, $btn2, $aStrings[4], $msg Local Enum $idNew = 1000, $idOpen, $idSave, $idHelp $hGUI = GUICreate("Toolbar", 400, 200) $hReBar = _GUICtrlReBar_Create($hgui, BitOR($RBS_VARHEIGHT, $RBS_AUTOSIZE, $RBS_BANDBORDERS)) $hToolbar = _GUICtrlToolbar_Create ($hGUI, BitOR($TBSTYLE_FLAT, $CCS_NORESIZE, $CCS_NOPARENTALIGN)) _GUICtrlToolbar_SetButtonWidth($hToolbar, 32, 40) ; limit button width (force text to word wrap to second row) _GUICtrlToolbar_SetMaxTextRows($hToolbar, 2) ; allow two rows of text _GUICtrlToolbar_AddBitmap ($hToolbar, 1, -1, $IDB_STD_LARGE_COLOR) $aStrings[0] = _GUICtrlToolbar_AddString ($hToolbar, "&New File") $aStrings[1] = _GUICtrlToolbar_AddString ($hToolbar, "&Open File") $aStrings[2] = _GUICtrlToolbar_AddString ($hToolbar, "&Save File") $aStrings[3] = _GUICtrlToolbar_AddString ($hToolbar, "&Help") _GUICtrlToolbar_AddButton ($hToolbar, $idNew, $STD_FILENEW, $aStrings[0]) _GUICtrlToolbar_AddButton ($hToolbar, $idOpen, $STD_FILEOPEN, $aStrings[1]) _GUICtrlToolbar_AddButton ($hToolbar, $idSave, $STD_FILESAVE, $aStrings[2]) _GUICtrlToolbar_AddButtonSep ($hToolbar) _GUICtrlToolbar_AddButton ($hToolbar, $idHelp, $STD_HELP, $aStrings[3]) $btn1 = GUICtrlCreateButton("Add ToolBarBand Fixed",50, 100, 150,25) $btn2 = GUICtrlCreateButton("Add ToolBarBand v3.2.9.14",50, 150, 150,25) ;_GUICtrlToolbar_SetButtonSize($hToolbar, 60, 40) GUISetState() Do $msg = GUIGetMsg() Switch $msg Case $btn1 ; AddToolBarBand with fix _GUICtrlRebar_DeleteBand($hReBar, 0) _MOD_GUICtrlReBar_AddToolBarBand($hReBar, $hToolbar, "", 0) Case $btn2 ; AddToolBarBand v3.2.9.14 _GUICtrlRebar_DeleteBand($hReBar, 0) _GUICtrlReBar_AddToolBarBand($hReBar, $hToolbar, "", 0) EndSwitch Until $msg = $GUI_EVENT_CLOSE EndFunc ;==>_Main Func _MOD_GUICtrlRebar_AddToolBarBand($hwndRebar, $hwndToolbar, $sText = "", $iIndex = -1, $fStyle = -1) If $Debug_RB Then _GUICtrlRebar_ValidateClassName($hwndRebar) If $Debug_RB Then _GUICtrlRebar_ValidateClassName($hwndToolbar, "ToolbarWindow32") Local $tBuffer, $pBuffer, $dwBtnSize, $NumButtons, $iDefaultWidth Local $pMemory, $tMemMap, $pText, $iResult Local $tINFO = DllStructCreate($tagREBARBANDINFO) Local $pINFO = DllStructGetPtr($tINFO) Local $iBuffer = StringLen($sText) + 1 Local $iSize = DllStructGetSize($tINFO) If $fStyle <> -1 Then $fStyle = BitOR($fStyle, $RBBS_CHILDEDGE, $RBBS_GRIPPERALWAYS) Else $fStyle = BitOR($RBBS_CHILDEDGE, $RBBS_GRIPPERALWAYS) EndIf ;// Initialize band info used by the toolbar DllStructSetData($tINFO, "cbSize", $iSize) DllStructSetData($tINFO, "fMask", BitOR($RBBIM_STYLE, $RBBIM_TEXT, $RBBIM_CHILD, $RBBIM_CHILDSIZE, $RBBIM_SIZE, $RBBIM_ID)) DllStructSetData($tINFO, "fStyle", $fStyle) ;// Get the height of the toolbar. $dwBtnSize = _SendMessage($hwndToolbar, $TB_GETBUTTONSIZE) ; Get the number of buttons contained in toolbar for calculation $NumButtons = _SendMessage($hwndToolbar, $TB_BUTTONCOUNT) $iDefaultWidth = $NumButtons * _WinAPI_LoWord($dwBtnSize) ; was _WinAPI_HiWord($dwBtnSize) ;// Set values unique to the band with the toolbar. $tBuffer = DllStructCreate("char Text[" & $iBuffer & "]") DllStructSetData($tBuffer, "Text", $sText) $pBuffer = DllStructGetPtr($tBuffer) DllStructSetData($tINFO, "hwndChild", $hwndToolbar) DllStructSetData($tINFO, "cyChild", _WinAPI_HiWord($dwBtnSize)) ; was _WinAPI_LoWord($dwBtnSize) DllStructSetData($tINFO, "cxMinChild", $iDefaultWidth) DllStructSetData($tINFO, "cyMinChild", _WinAPI_HiWord($dwBtnSize)) ; was _WinAPI_LoWord($dwBtnSize) DllStructSetData($tINFO, "cx", $iDefaultWidth) ;// The default width is the width of the buttons. DllStructSetData($tINFO, "wID", _GUICtrlRebar_GetBandCount($hwndRebar)) ;// Add the band that has the toolbar. $pMemory = _MemInit($hwndRebar, $iSize + $iBuffer, $tMemMap) $pText = $pMemory + $iSize DllStructSetData($tINFO, "lpText", $pText) _MemWrite($tMemMap, $pINFO, $pMemory, $iSize) _MemWrite($tMemMap, $pBuffer, $pText, $iBuffer) ;// Add the band that has the combobox If _GUICtrlRebar_GetUnicodeFormat($hwndRebar) Then $iResult = _SendMessage($hwndRebar, $RB_INSERTBANDW, $iIndex, $pMemory, 0, "int", "ptr") <> 0 Else $iResult = _SendMessage($hwndRebar, $RB_INSERTBANDA, $iIndex, $pMemory, 0, "int", "ptr") <> 0 EndIf _MemFree($tMemMap) Return $iResult EndFunc ;==>_GUICtrlRebar_AddToolBarBand |
|||
#19 | Fixed | FileSetTime() erronously rounds UP on non NTFS partition | Jpm | pseakins |
Description |
If executed on a FAT drive the following script will fail (reports incorrect timestamp). It works correctly on an NTFS drive. XP-Pro-SP2 #include <File.au3> $TempFile = _TempFile(@ScriptDir, 'tst', '.txt', 5) $handle = FileOpen($TempFile, 1) If $handle = -1 Then MsgBox("", "", 'Unable to open temporary file "' & $TempFile & '".') Exit EndIf FileWrite($handle, "test") FileClose($handle) $timeset = '20071219184516' FileSetTime($TempFile, $timeset, 0) $timeget = FileGetTime($TempFile, 0, 1) FileDelete($TempFile) If $timeget <> $timeset Then MsgBox("", "", 'File timestamp is WRONG' & @CRLF & _ 'It should be ' & $timeset & @CRLF & _ 'instead, it is ' & $timeget) Else MsgBox("", "", 'Timestamp is CORRECT') EndIf |
|||
#21 | Fixed | Scite Jump to Function case sensitive | Valik | Jpm |
Description |
Ctrl-J does found the function is the case does not match. As AutoIt is case insensitive in Function name, Scite must do the same |
Note: See TracQuery
for help on using queries.