// start include #include #include // end include //start std using namespace std; //end std //main function, runs when the program opens int main(void) { HWND D2Handle = 0; HDC DeviceContextThingy; D2Handle = FindWindow (NULL, "Diablo II"); if(!D2Handle) { cout << "Couldnt Find Window" << endl; return 0; } DeviceContextThingy = GetDC(D2Handle); cout << "Attempting to draw text on D2 using TextOut." << endl; while (true) { Sleep(1); TextOut(DeviceContextThingy, 200, 200, "HI!", 3); } return 0; }