Jump to content

Scroll bar with objects


jackraymund
 Share

Recommended Posts

So, i make program like a screenshooter, and i need a (left bar in ss)

like this

http://scr.hu/0rby/k4lig

how can i do this? because i search, and i cant find that

@edit

i found, its richedit but how can i take here a picture?

http://www.autoitscript.com/autoit3/docs/libfunctions/GuiRichEdit%20Management.htm

@edit2

i found how to place here image, but how to disable this?(to dont resize) and jpg

#include <GuiRichEdit.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiMenu.au3>

Global $hRichEdit, $mnu, $mnuUndo, $mnuRedo, $mnuCut, $mnuCopy
Global $mnuPaste, $mnuPasteSpl, $mnuPasteSplRTF, $mnuPasteSplwObjs,$tagMSGFILTER

Main()

Func Main()
    Local $hGui
    $hGui = GUICreate("Example (" &amp;amp; StringTrimRight(@ScriptName, 4) &amp;amp; ")", 320, 350, -1, -1)
    $hRichEdit = _GUICtrlRichEdit_Create($hGui, "This is a test.", 10, 10, 300, 220, _
    BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL))
    GUISetState(@SW_SHOW)

    _GUICtrlRichEdit_AppendText($hRichEdit, ReadBmpToRtf(FindFirstBMP()) &amp;amp; @CR)

    While True
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                _GUICtrlRichEdit_Destroy($hRichEdit) ; needed unless script crashes
;~              GUIDelete()     ; is OK too
                Exit
        EndSwitch
    WEnd
EndFunc   ;==>Main

Func ReadBmpToRtf($sBmpFilspc)
    Local $hFile, $sRtf
    $hFile = FileOpen($sBmpFilspc, 16)
    If FileRead($hFile, 2) <> "0x424D" Then Return SetError(1, 0, "")
    FileRead($hFile, 12)
    $sRtf = '{\rtf1{\pict\dibitmap ' &amp;amp; Hex(FileRead($hFile)) &amp;amp; '}}'
    FileClose($hFile)
    Return $sRtf
EndFunc   ;==>ReadBmpToRtf

Func FindFirstBMP($sPath = @WindowsDir)
    Local $hFind, $sBmpFilspc
    $hFind = FileFindFirstFile($sPath &amp;amp; "\*.bmp")
    $sBmpFilspc = FileFindNextFile($hFind)
    FileClose($hFind)
    Return $sPath &amp;amp; "\" &amp;amp; $sBmpFilspc
EndFunc   ;==>FindFirstBMP
Edited by jackraymund

thanks you BrewManNH

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...