Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2005

Tip: Looking for answers? Try searching our database.

FindWindowEx - undeclared identifier/not a member of global namesp

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Simon Matthews - 18 Mar 2005 13:25 GMT
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?
Jeff Partch [MVP] - 18 Mar 2005 13:31 GMT
> Hi,
>
[quoted text clipped - 5 lines]
> 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)

Signature

Jeff Partch [VC++ MVP]

Simon Matthews - 18 Mar 2005 13:57 GMT
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?

> All I can think of it that it's wrapped in the preprocessor conditional...
>
> #if(WINVER >= 0x0400)
Tamas Demjen - 18 Mar 2005 18:25 GMT
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

> 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?
Severian - 21 Mar 2005 00:00 GMT
>Hi,
>
[quoted text clipped - 5 lines]
>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!

--
Sev

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.