简体   繁体   中英

Selecting windows drop down menu items

I know win32api is able to FindWindow(None, "Title of some window)

But how do I find and select drop down menu items?

Reading the module chm, I can't find any straight foward way of doing this.

Any suggestions?

But how do I find and select drop down menu items?

You need a Window handle. You can find it with Spy++ . You can also enumerate Windows with EnumWindows function . Look for the one with a COMBOBOX windows class. See About Window Classes for more details.

You then use the SetSel() method on the combo box, which wraps EM_SETSEL .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM