rendered paste body#include <windows.h>
#include <stdio.h>
int main(int argc, char ** argv)
{
HWND ie_window = FindWindow("IEFrame", NULL);
if (!ie_window)
{
printf("Error: No IE Window\n");
return 1;
}
DWORD title_len = GetWindowTextLength(ie_window) + 1;
char *title = new char[title_len];
GetWindowText(ie_window, title, title_len);
char *video_title = strchr(title, '-') + 2;
char *end_title = strchr(video_title, '-') - 1;
*end_title = 0;
printf("Video title: =>%s<=\n", video_title);
delete [] title;
return 0;
}