Alex
Alex

Reputation: 95

Manipulating scrollbars in third-party application

I need to create an application which do the following:

At the beginning we have notepad window open with a lot of text in it.

Our application must scroll through this file and take notepad window screenshot after each scroll action.

I've tried to achieve this using SBM_GETRANGE, SBM_GETRANGE, SBM_SETPOS but it does not work for me.

Please note that emulating keyboard events (e.g. PageDown, PageUp) is not an option for me because this application should also work with other applications which may not support keyboard shortcuts for manipulating scrolls.

Thanks.

Upvotes: 0

Views: 230

Answers (1)

egrunin
egrunin

Reputation: 25063

Don't try to manipulate the scrollbar directly - instead SetFocus() to the text window, then send Page Down messages. If there are applications where you must manipulate the scrollbar, you should get its window handle and send the messages there.

Upvotes: 1

Related Questions