A menu that includes a search bar isn't provided by the Windows API.
We could always create our own by starting with a blank window and
doing all the drawing and handling of mouse messages ourselves. That's
a lot of work to implement a simple menu though.
I want to build a menu like below image. Would you get some advices from you?
Thanks!
Or vs-code-like command palette is enough. But I want auto close when lost focus.
Hi kite,
A menu that includes a search bar isn't provided by the Windows API.
We could always create our own by starting with a blank window and
doing all the drawing and handling of mouse messages ourselves. That's
a lot of work to implement a simple menu though.
This is a search from CodeProject for menus. It gives a bit of an idea
of how windows menus can be customized with owner draw to change their
appearance.
https://www.codeproject.com/search.aspx?q=menus&x=0&y=0&sbo=kw
Windows menus are closed when the menu loses keyboard focus. When we
click our mouse somewhere outside the menu, the menu will close.
Best regards,
David