Take a screenshot in C - windows

前端 未结 2 626
野性不改
野性不改 2021-01-19 12:55

I want to take a screenshot in C on my windows machine and save it as a jpg or bmp or whatever. Anyway, I tried to do it by my own, it\'s okay and working well but it\'s UNB

2条回答
  •  孤独总比滥情好
    2021-01-19 13:35

    This is explained here:

    http://msdn.microsoft.com/en-us/library/dd183402(v=vs.85).aspx

    See the CaptureAnImage() function in the example. The whole code is a bit complex because it is a full win32 app but it shows how to capture a sepcific window and save to filename.bmp.

提交回复
热议问题