Is there any penality for re-registering a windows class multiple times? Or a way to check (other then setting a global flag) that such a class has been registered?
Posted on 2001-03-09 19:53:00 by Ernie
Ernie, I have done it the old way as in win3.11 where you test the existence of the class and it does not matter on win95b that I use. If the class is already registered, it will not re-register it again and you get a zero return value but it does not matter. Unless you have some other need, simplicity wins here. Regards,
Posted on 2001-03-10 03:28:00 by hutch--
Great. As long as I ain't wasting precious GDI resources or such, I have no problem re-registering it, as there is no 'clean' place to put the registration code except in a constructor, which for contaiment reasons is hidden from the top app message loop code. It's not really worth the trouble to do it another way (such as inside a DllMain).... or is it? A InitClass method is kinda OK. Hrmmmm....
Posted on 2001-03-10 13:34:00 by Ernie