Jump to content
Sign in to follow this  
Gene

How does window scrolling work?

Recommended Posts

$WS_VSCROLL and $WS_HSCROLL will put the scroll bars on the window, but they don't do anything except pop back to their origins when moved.

Searched the Help File for "SCROLL" 2 hits, but not useful.

I have looked in "GUICtrlCreateEdit.au3" and "GUICtrlCreateList.au3" because the have the word scroll in them, but found nothing useful. I tried searching the Forum for "scroll", got a lot of hits, but nothing useful (they were all reference to scrolling up or down to find some bit of info). I tried again with "$WS_VSCROLL" got a zillion hits, but not one of the first 25 even contained "$WS_VSCROLL". Next I searched for "0x00200000" found nothing as regards windows

I'm willing to write my own code, but I do need someone to tell me where to look this up.

Some of the code I've tried...

;$hGuiHandle = GUICreate ($Title, $iWidth, $iheight+25, $xPos, $yPos, BitOR ( $WS_HSCROLL, $WS_VSCROLL ) )
;$hGuiHandle = GUICreate ($Title, $iWidth, $iheight+25, $xPos, $yPos, $ES_AUTOVSCROLL+$WS_VSCROLL )
;$hGuiHandle = GUICreate ($Title, $iWidth, $iheight+25, $xPos, $yPos, BitOR ( $ES_AUTOHSCROLL, $WS_HSCROLL, $ES_AUTOVSCROLL, $WS_VSCROLL ) )
;$hGuiHandle = GUICreate ($Title, $iWidth, $iheight+25, $xPos, $yPos, $WS_HSCROLL + $WS_VSCROLL )

And for the Control

$hPicCtrlHandle= GUICtrlCreatePic ($sImageFileName & "." & $sFileExt, -1, -1, $aMapCtrlPos[2], $aMapCtrlPos[3], $WS_HSCROLL + $WS_VSCROLL)

I've tried about as many things on the Control as on the window.

Edited by Gene

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

Share this post


Link to post
Share on other sites

$WS_VSCROLL and $WS_HSCROLL will put the scroll bars on the window, but they don't do anything except pop back to their origins when moved.

Searched the Help File for "SCROLL" 2 hits, but not useful.

I have looked in "GUICtrlCreateEdit.au3" and "GUICtrlCreateList.au3" because the have the word scroll in them, but found nothing useful.  I tried searching the Forum for "scroll", got a lot of hits, but nothing useful (they were all reference to scrolling up or down to find some bit of info).  I tried again with "$WS_VSCROLL" got a zillion hits, but not one of the first 25 even contained "$WS_VSCROLL".  Next I searched for "0x00200000" found nothing as regards windows

I'm willing to write my own code, but I do need someone to tell me where to look this up.

Some of the code I've tried...

;$hGuiHandle = GUICreate ($Title, $iWidth, $iheight+25, $xPos, $yPos, BitOR ( $WS_HSCROLL, $WS_VSCROLL ) )
;$hGuiHandle = GUICreate ($Title, $iWidth, $iheight+25, $xPos, $yPos, $ES_AUTOVSCROLL+$WS_VSCROLL )
;$hGuiHandle = GUICreate ($Title, $iWidth, $iheight+25, $xPos, $yPos, BitOR ( $ES_AUTOHSCROLL, $WS_HSCROLL, $ES_AUTOVSCROLL, $WS_VSCROLL ) )
;$hGuiHandle = GUICreate ($Title, $iWidth, $iheight+25, $xPos, $yPos, $WS_HSCROLL + $WS_VSCROLL )

And for the Control

$hPicCtrlHandle= GUICtrlCreatePic ($sImageFileName & "." & $sFileExt, -1, -1, $aMapCtrlPos[2], $aMapCtrlPos[3], $WS_HSCROLL + $WS_VSCROLL)

I've tried about as many things on the Control as on the window.

<{POST_SNAPBACK}>

Hi :idiot: i give you this exampel i hope that was wat you need :D

; ---------------------------------------------------------------------------- 
; 
; AutoIt Version: 3.0 
; Language:       English 
; Platform:       Win9x / NT 
; Author:         DirtyBanditos 2004-2005 
; 
; Script Function: 
;   Template AutoIt script. 
; 
; ---------------------------------------------------------------------------- 
; ---------------------------------------------------------------------------- 
; Set up our defaults 
; ---------------------------------------------------------------------------- 
;AutoItSetOption("MustDeclareVars", 1) 
;AutoItSetOption("MouseCoordMode", 0) 
;AutoItSetOption("PixelCoordMode", 0) 
;AutoItSetOption("RunErrorsFatal", 1) 
;AutoItSetOption("TrayIconDebug", 1) 
;AutoItSetOption("WinTitleMatchMode", 4) 
; ---------------------------------------------------------------------------- 
; Script Start 
; ---------------------------------------------------------------------------- 
#include <GUIConstants.au3> 
Func _MouseWrap() 
   While 1 
      $pos = MouseGetPos() 
      If $pos[0] < 2 Then MouseMove(@DesktopWidth - 2, $pos[1], 1) 
      If $pos[0] > @DesktopWidth - 2 Then MouseMove(2, $pos[1], 1) 
      If $pos[1] < 2 Then MouseMove($pos[0], @DesktopHeight - 2, 1) 
      If $pos[1] > @DesktopHeight - 2 Then MouseMove($pos[0], 2, 1) 
   Wend 
EndFunc  ;==>_MouseWrap 
GUICreate("Test Scroll Keyboardes up an down keys ", 900, 470, -1, -1, "Arial Black") 
GUISetBkColor(0x000000) 
GUICtrlCreateLabel("Test Scroll Keyboardes up an down keys", 75, 10, 600, 300) 
GUICtrlSetColor(-1, 0xffff0090) 
GUICtrlSetFont(-1, 14, 40) 
GUICtrlCreateLabel("Test Scroll Keyboardes up an down keys", 680, 40, 300, 300) 
GUICtrlSetColor(-1, 0xff33FF33) 
GUICtrlSetFont(-1, 10, 10) 
GUISetFont(10, 400, 0, "Arial Black") 
;$MyList = GUICtrlCreateList ("Arial Black", 25, 50, 750, 240) 
$MyList = GUICtrlCreateList("", 25, 90, 850, 320, $LBS_USETABSTOPS) 
GUICtrlSetData($MyList, "Test Scroll" & @TAB & "http://www.autoitscript.com/autoit3/scite/downloads.php") 

$OpenURL = GUICtrlCreateButton("Open", 25, 395, 100, 30, $BS_DEFPUSHBUTTON) 
GUICtrlSetState($OpenURL, $GUI_DISABLE) 
$Close = GUICtrlCreateButton("Close", 675, 395, 100, 30) 
GUISetState() 
$msg = 0 
While $msg <> $GUI_EVENT_CLOSE 
   $msg = GUIGetMsg() 
   If GUICtrlGetState($OpenURL) <> $GUI_ENABLE And GuiCtrlRead ($MyList) <> "" Then 
      GUICtrlSetState($OpenURL, $GUI_ENABLE) 
      GUICtrlSetFont($OpenURL, 9, 800) 
   EndIf 
   Select 
      Case $msg = $Close 
         Exit 
      Case $msg = $MyList 
         GUICtrlSetState($OpenURL, $GUI_ENABLE) 
         GUICtrlSetFont($OpenURL, 9, 800) 
      Case $msg = $OpenURL 
         If GuiCtrlRead ($MyList) <> "" Then 
            $SelectedURL = StringMid(GuiCtrlRead ($MyList), StringInStr(GuiCtrlRead ($MyList), "HTTP") - 1, 250) 
            Run(@ComSpec & " /c Start " & $SelectedURL, "", @SW_HIDE) 
         Else 
            MsgBox(0, "No URL selected", "No URL selected!") 
         EndIf 
   EndSelect 
Wend
Edited by DirtyBanditos

Share this post


Link to post
Share on other sites

Right now scrolling doesn't work...


Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote]

Share this post


Link to post
Share on other sites

Right now scrolling doesn't work...

<{POST_SNAPBACK}>

I am not sure but the styles are related to a control.

So search MSDN/google to know what you can do with a specific control.

Share this post


Link to post
Share on other sites

Right now scrolling doesn't work...

<{POST_SNAPBACK}>

Thanks for the response.

Do you mean not working for a window, or not working for anything?

Edited by Gene

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

Share this post


Link to post
Share on other sites

Hi :idiot:  i give you this exampel i hope that was wat you need :D

Thanks for the example.

The code did not enable the OPEN button or load the URL data. I don't completely understand all of it yet. My first effort was to make it fit on a 800X600 screen, It does now, but doesn't do what I think you meant it to.


[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...