views:

33

answers:

1

I need to register a window class, and right after that set some data in it's extra memory section (the one cbClsExtra refers to) before any window of the class is being created. The problem is that SetClassLong expects a HWND in order to identify the class, instead of the class's name or atom.

What's the way to acheive this?

+1  A: 

Why can't you just create a dummy window of that class, set the data and destroy the window?

Anders
Agreed. The whole point of RegisterClass/Ex() is to register a class that has to be used with CreateWindow/Ex(). The API does not allow you to access a class by itself. An HWND is required to get the class information.
Remy Lebeau - TeamB