Question

This should be a simple question but I'm new to python and to win32 and can't seem to find an answer to this. I'm using python with the win32gui library and I want to know how do I retrieve the handle to a toolbar in a window.

Say I have notepad.exe open and I want to access the "File" "Edit" etc. buttons in the toolbar, how do I do that and how do I get a handle to the toolbar to begin with?

Was it helpful?

Solution

Notepad does not have a toolbar. Notepad has a menu.

You can retrieve the handle of the menu associated with a window using GetMenu.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top