Online PC Builder
EMI
Best Selling - SAHARA LAPTOP
Lenovo Laptops
Reliance WiFi Data Card
Microsoft Office 2007
Board index
LoginLogin User Control PanelUser Control Panel 
  FAQFAQ SearchSearch  
SwamiPC Sahara Scratch Offer

error C2664: 'EnumWindows' : cannot convert parameter 1 from

C++, VC++, MFC and other flavour of C++ Language

error C2664: 'EnumWindows' : cannot convert parameter 1 from

Postby cppguru on Thu Apr 19, 2007 3:41 pm

I'm getting following error while trying to use EnumWindow

error C2664: 'EnumWindows' : cannot convert parameter 1 from 'int (struct HWND__ *,long)' to 'int (__stdcall *)(struct HWND__ *,long)'

Any help....
cppguru
 
Posts: 4
Joined: Mon Apr 16, 2007 11:40 am

Postby Roshini on Thu Apr 19, 2007 3:48 pm

You need to remove declaration of EnumWindowsProc from the calss scope.
Declare it outside of the class and it will work.

Declare it in .h or .cpp file at top.

This function cannot be declared as a class member as it has to be global and requires a different calling convention.
Roshini
Sr. Systems Engineer
Wipro Technologies
EC-3
Bangalore
Roshini
 
Posts: 5
Joined: Thu Apr 19, 2007 3:44 pm


Return to C++ Programming

Who is online

Users browsing this forum: No registered users and 0 guests

phpBB SEO

SAIPL - Career
SwamiPC - Career
International Jobs
Jobs for Fresher
Referral Offer
Microsoft Vista