Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New Win32 Question 1

Status
Not open for further replies.

Kalisto

Programmer
Feb 18, 2003
997
GB
OK, I have my main application, that contains my message loop, and also my code to create and register new windows

If I have my window functions that need passing to the window structure (via the (WNDPROC) foo; route in my main.cpp file, then they work.
If I have them in my class files, then I get an error 2440 (cannot cast / convert from LRESULT CALLBACK foo(..) to (WNDPROC)foo(..)

I have tried reinterpret_cast<>, adn also creating function pointers, but no joy. Whats teh trick here ?

K
 
It has to be a static function if it is a class member. I'd imagine that's your problem.
 
Thats the Bunny, cheers.

Now I gotta figure outh why the ap seems to run but doesn't run well...

Ho Hum, thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top