I read a piece of code, and the code looks like the following part.
CWnd is a MFC class
class CFrameGrabber : public CWnd {
....
};
BOOL CFrameGrabber::Create(int x, int y, CWnd *pParentWnd) {
.......
if( !capDriverConnect(hWnd, DEFAULT_CAPTURE_DRIVER)) {
::DestroyWindow(hWnd);
return FALSE;
}
.......
}
My question is: This is a correct code, and what does the preceding
"::" of the DestroyWindow(hWnd) really mean here? If I remove the
preceding "::" from the DestroyWindow(hWnd), the compiler will call the
inherited DestroyWindow() from CWnd class and generate an error.
I can not find any reference about the usage of "::" like this.
Previously, I've only seen something like A::test()....
Thanks