I am making a windows application and i can't find a way to destroy a button by pressing another button and to close the program by pressing the button.
Thank you for the help in advance.
P.S. yes i did search it online and yes i did read a lot of tutorial books but can't find the answer anywhere.
That's sort of vague, i don't really know what you mean by it - but try this: If you press escape, the program ends without pressing enter. I don't know what you mean by "Destroy a button by pressing another button" though. This is a console application that ends if you press escape:
I am not making a console application, I am making a windows application. "Destroy a button" with that i want to make one or more buttons disapear from the screen by presing a button. By that i mean the buttons on the screen that are on the windows application (not on keyboard). It would be even better if I could just simply do something like clear screen although I don't know how to do it for windos application.
You'll need a way to get the current position of the mouse cursor every frame. Then what you can do with that is check if it is colliding with a button, and if so, you can check whether or not the user clicked. If the user clicks while the mouse cursor is within the boundary of the button, you can have it do whatever it is you want to do.
Yea but i don't know how to do any of that. I am kinda new to making windows apps. I know how to do it on console cause i was doing it a lot. Windows programing is something new to me and hard.