SetWindowLongPtr

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
elvman
Posts: 253
Joined: Sun Sep 17, 2006 9:37 am
Location: Riga, Latvia
Contact:

SetWindowLongPtr

Post by elvman »

Today I browsed the Irrlicht source and found this function:

Code: Select all

irr::CIrrDeviceWin32* getDeviceFromHWnd(HWND hWnd)
{
	irr::core::list<SEnvMapper>::Iterator it = EnvMap.begin();
	for (; it!= EnvMap.end(); ++it)
		if ((*it).hWnd == hWnd)
			return (*it).irrDev;

	return 0;
}
Wouldn't it be faster to use this function: http://msdn.microsoft.com/en-us/library ... S.85).aspx with GWLP_USERDATA?
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

It _might_ be faster, but it would present problems if you want that GWLP_USERDATA value to be available for use by the application.

Travis
Post Reply