How to scroll the window without displaying the scroll bar

Ask for help, how to use AHK_H, etc.
arcticir
Posts: 471
Joined: 17 Nov 2013, 11:32

How to scroll the window without displaying the scroll bar

11 Jul 2017, 14:34

One of my scripts uses the AHKGUI simulation menu to make the menu more flexible and elegant.
But I have been unable to solve its rolling problem.
In AHKGUI, use the "WS_VSCROLL" style, you can scroll it, but this scroll bar can not be hidden, can not be set, and can not modify it, it destroys the beauty of the menu.

So I tried to use the WINAPI GUI to create a scroll bar to hide it by defining its width, but unfortunately it could not scroll the main window. Who knows where it was wrong?


Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Image

Image
HotKeyIt
Posts: 1549
Joined: 29 Sep 2013, 18:35
Contact:

Re: How to scroll the window without displaying the scroll bar

11 Jul 2017, 15:32

Try this:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

arcticir
Posts: 471
Joined: 17 Nov 2013, 11:32

Re: How to scroll the window without displaying the scroll bar

11 Jul 2017, 17:06

Thanks. If it does not flicker, is perfect.
Also I am curious, AHKGUI can not add more custom options? For example, "+ Border" border color, "VSCROLL" width.
This does not conflict with the original function, but is more free.
HotKeyIt
Posts: 1549
Joined: 29 Sep 2013, 18:35
Contact:

Re: How to scroll the window without displaying the scroll bar

11 Jul 2017, 17:12

I don't think you can change border color and neither Scroll width :(
arcticir
Posts: 471
Joined: 17 Nov 2013, 11:32

Re: How to scroll the window without displaying the scroll bar

11 Jul 2017, 18:12

It seems that the use of WINAPI GUI is also hopeless to solve this problem...
The question seems forever will never be resolved. :(

Code: [Select all] [Download] GeSHi © Codebox Plus

GuiCreate()
WS_CHILD := 0x40000000
WS_VSCROLL := 0X200000
WS_VISIBLE := 0x10000000

hwnd:=CreateWindowEx(0, "AutoHotkeyGui", "", 0, 200, 200, 400, 400, 0, 0, 0, 0)
loop 20
CreateWindowEx(0, "static", A_Index "______________________________", WS_CHILD | WS_VISIBLE, 25, 50*(A_Index-1), 400, 40, hwnd, 0, 0, 0)
CreateWindowEx(0, "ScrollBar", "", WS_CHILD | WS_VISIBLE | 0x5, 0, 0, 10, 800, hwnd, 0, 0, 0)
ShowWindow(hwnd, 4)
Return
User avatar
jeeswg
Posts: 2986
Joined: 19 Dec 2016, 01:58
Location: UK

Re: How to scroll the window without displaying the scroll bar

11 Jul 2017, 19:32

@arcticir: That GUI looks really nice thanks for posting the image. Could you provide your code in full, so that I can experiment. I tried using what you and HotKeyIt have provided so far but there seem to be bits missing.

In case any of the scrollbar styles are useful:
Scroll Bar Control Styles (Windows)
https://msdn.microsoft.com/en-us/library/windows/desktop/bb787533(v=vs.85).aspx
arcticir
Posts: 471
Joined: 17 Nov 2013, 11:32

Re: How to scroll the window without displaying the scroll bar

12 Jul 2017, 08:33

Thanks. but i tried these styles still can not scroll the main window.

Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 1 guest