What namespace is CWnd in?

My biggest complaint about the MS docs is they don’t say what actually contains what class you’re looking at. OpenCV is like the gold standard of docs. Tells you the whole function, and what header file it’s located in.

For those of us that haven’t been doing this for 20 years, I don’t just know where this is at and it’s difficult to google without noise.

What namespace is CWnd in?

>Solution :

  1. CWnd being a legacy MFC class, is not defined in any namespace, and therefore considered belonging the global namespace.
  2. In order to use it you need to #include <afxwin.h>, as you can see in the documentation.

Leave a Reply