Ok, I have code that needs to forever loop, and process. My code in the windows procedure has a case WM_LBUTTONDOWN: . I left click on the client area of the window and it processes the code accordingly. Now so that it keeps processing code at the end of the code I SendMessage(hwnd,WM_LBUTTONDOWN,0,0); so that it then sends my application a constant left mouse button down command, and loops the code over and over.
The problem is when I go to close my program either by the X at the top right, or using the right button of my mouse which has code to destroy the application. It hangs, and does not terminate the program,and windows takes over and kills the program some time after.
For the game cheats I am developing I basically created a small window for each program that is to loop the code, and each hangs whenever you try to close them.
I dont want my users to have to have 7 little windows running on their desktop, and 7 windows which take forever to close usually requiring task manager to close them.
Im still new to windows api here, but im sure theres something I could do, or am not doing.
When time comes that I create one parent application with buttons to run all these stubs. I was wondering if I set each button to open an invisable child window to do this looping\processing, and a corresponding OFF button to destroy the invisable child window might be my only choice. What I dont know is will it "HANG" my parent window from further processing with these multiple invisable child windows?
I am here because I feel my ignorance is blind to an easier way. So any suggestions or direction would greatly be appreciated!