C++ Error: identifier "CWnd" is not defined

5.9k Views Asked by At

I'm very much a C++ newbie, so please bear with me.

This line of code which resides within a function:

CWnd* pWnd = CWnd::FindWindow("Shell_TrayWnd", "");

CWnd is coming up as "undefined". I know I need to define it in the global scope, but how? What header do I need to include to use this class? Project is MFC.

Using VS 2010.

1

There are 1 best solutions below

2
On

Here's how to solve this problem independently.

First, Google for "cwnd"

Second, click the first link.

Third, read the page

Requirements

Header: afxwin.h