How do I find out the resolution (current) using API? Thanks
if(GetWindowLong(hwnd,GWL_ID)==IDC_MICROSOFT_APPLICATION) { SetWindowText(hwnd,"I suck."); SendMessage(hwnd,WM_START_SUCKING,0,0); SendMessage(hwnd,WM_CRASH,0,0); }
Code: long xres,yres; xres = GetSystemMetrics(SM_CXSCREEN); yres = GetSystemMetrics(SM_CYSCREEN); printf("%s %ld %s %ld","Resolution is: ",xres,"by",yres); That what you want?
long xres,yres; xres = GetSystemMetrics(SM_CXSCREEN); yres = GetSystemMetrics(SM_CYSCREEN); printf("%s %ld %s %ld","Resolution is: ",xres,"by",yres);
Forum Rules