Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Windows.h> // This is needed for some reason, I think to get HWND.
- using namespace std;
- int main()
- {
- int x;
- HWND test_window = FindWindowA(NULL, "Kalkylatorn"); /*Return NULL if the window wasn't found and return
- 1 if the window was found*/
- if(test_window)
- {
- cout << "The calculator is open." << endl;
- cin >> x;
- }
- else
- {
- cout << "The calculator is not open." << endl;
- cin >> x;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement