FindWindowEx - undeclared identifier/not a member of global namesp

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'm trying to find a window handle using FindWindowEx. I get an error
undecalred identifier if I use FindWindowEx() and not a member of global
namespace if I use ::FindWindowEx()... Even though FindWindow() works
perfectly well.

I have imported <windows.h> but being quite new to C++ I can't find a
solution, can anyone help me?
 
Simon Matthews said:
Hi,

I'm trying to find a window handle using FindWindowEx. I get an error
undecalred identifier if I use FindWindowEx() and not a member of global
namespace if I use ::FindWindowEx()... Even though FindWindow() works
perfectly well.

I have imported <windows.h> but being quite new to C++ I can't find a
solution, can anyone help me?

All I can think of it that it's wrapped in the preprocessor conditional...

#if(WINVER >= 0x0400)
 
Sorry, some C++ stuff is new to me.... including preprocessor conditionals,
where can I find it and is it possible to change them to always include the
findwindowex?
 
You're probably running VC++ on Win95, where WINVER is lower. Just
#define WINVER 0x0400
// ^^ put this before you include windows.h
#include <windows.h>

Your program won't run of course, because your Windows is too old.

Tom
 
On Fri, 18 Mar 2005 04:25:06 -0800, "Simon Matthews" <Simon
Hi,

I'm trying to find a window handle using FindWindowEx. I get an error
undecalred identifier if I use FindWindowEx() and not a member of global
namespace if I use ::FindWindowEx()... Even though FindWindow() works
perfectly well.

I have imported <windows.h> but being quite new to C++ I can't find a
solution, can anyone help me?

FindWindowEx will only run on NT4 or later and Win95 or later, so
WINVER must be defined as at least 0x0400.

Your program will not run on NT3.1 or 3.5, though that's not likely to
matter!
 
Back
Top