I want to make a C++ button on Start>Run i.e but when I do it will not do signalled event?
Im sorry I have seen that you do not get the question.
Ok basically when you create a button with CreateWindowEx(); I want to do that but put on a different window with SetPArent which I have already done now the button does not work so I need my program to someone get when it is clicked from the Run window as example!
And yes you have it, but it’s not making the button is the problem it’s getting when it’s clicked with my program since it does not belong to it anymore!
You need to apply the ancient but still-supported technique known in Windows as subclassing; it is well explained here (15-years-old article, but still quite valid;-). As this article puts it,
You’ll want “instance subclassing”, since you’re interested only in a single window (either your new button, or, the one you’ve
SetParented your new button to); if you decide to subclass a window belonging to another process, you’ll also need to use the injection techniques explained in the article, such as, injecting your DLL into system processes and watching over events with aWH_CBThook, and the like. But I think you could keep the button in your own process even though you’reSetParenting it to a window belonging to a different process, in which case you can do your instance subclassing entirely within your own process, which is much simpler if feasible.“Superclassing” is an alternative to “subclassing”, also explained in the article, but doesn’t seem to offer that many advantages when compared to instance subclassing (though it may compared with global subclassing… but, that’s not what you need here anyway).
You’ll find other interesting articles on such topics here, here, and here (developing a big, rich C++ library for subclassing — but, also showing a simpler approach based on hooks which you might prefer). Each article has a pretty difference stance and code examples, so I think that having many to look at may help you find the right mindset and code for your specific needs!