I need to take screen print (actually out put of a NMS area of a screen in my computer desktop) and save it in a Folder by date. Saving by date is now ok. But I cant copy the screen print out put to the clipboard.
I have written the code. But it is not working. Pls somebody correct this.
Code:#include <windows.h> #include <stdio.h> int main() { HBITMAP Output[MAX_PATH]; FILE *fp = fopen("c:\\image.bmp", "a+"); keybd_event(VK_SNAPSHOT, 0, 0, 0); keybd_event(VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0); OpenClipboard(NULL); Output = (HBITMAP)GetClipboardData(CF_BITMAP); EmptyClipboard(); CloseClipboard(); fwrite(Output, sizeof(Output[0]), sizeof(Output), fp); fclose(fp); return 0; }



LinkBack URL
About LinkBacks


