Programming question: What is the X clear search editbox button?

Plug-in and third party software discussion.
Post Reply
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Programming question: What is the X clear search editbox button?

Post by raccoon »

Hi void. Can you tell me what WinAPI and methods are used to create the X ''clear search'' button in the search editbox? Are you using subclassing? If it's simple, could you paste a code snippet?

everything-clear-x-button.png
everything-clear-x-button.png (35.62 KiB) Viewed 17820 times
Last edited by NotNull on Sat Feb 26, 2022 8:09 pm, edited 1 time in total.
Reason: Movd to Development forum
void
Developer
Posts: 16768
Joined: Fri Oct 16, 2009 11:31 pm

Re: Programming question: What is the X clear search editbox button?

Post by void »

It's my own button class, created with RegisterClassEx.

The class name is EVERYTHING_CLOSE_BUTTON.

The close button window is created as a child of the edit window.

The hardest part is adjust the edit margin so the text doesn't disappear underneath the close button.
I subclass the parent edit window so the close button can be positioned when the edit window is resized.
Post Reply