Answer the question
In order to leave comments, you need to log in
How to connect a third-party library in c++?
There is the following code pulled from stackoverflow.com/questions/2447172/getting-window...
The compiler (mingw) complains: CScreenShot has not been declared. According to requests to Google, it is not really clear what kind of cscreenshot it is. Namespace? Library? I'm not familiar with the benefits. How to fix this, I don't know.
#include <iostream>
using namespace std;
void CScreenShotDlg::OnPaint()
{
// device context for painting
CPaintDC dc(this);
// Get the window handle of calculator application.
HWND hWnd = ::FindWindow( 0, _T( "Calculator" ));
// Take screenshot.
PrintWindow( hWnd,
dc.GetSafeHdc(),
0 );
}
Answer the question
In order to leave comments, you need to log in
I don't even know where to start.
1) CScreenShotDlg - most likely these are classes from the example, and it is not in the library, read carefully the source;
2) CPaintDC is from MFC;
3) the rest is WinAPI - including windows.h should help.
Now the main question is why are you doing this if
Development with MFC and under WinAPI can drive even an experienced plus player crazy.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question