WNDCLASSEX declaration

Started by
12 comments, last by Kaalot 20 years, 3 months ago
Because you didn''t do one of the two things (memset it to 0, or fill in all data members), hIconSm had garbage in it.

Hence, problem.
Advertisement
I think he figured that part out.

Anyways, there''s no constructor for WNDCLASSEX. Keep in mind that windows.h (and the rest of the Platform SDK headers) are C style headers. Including constructors would be to a large degree silly. And really, if you initialize the structure members in the order they''re declared in the structure itself, it''s hard to miss one.
OK, thanks people. I''ll have to remember to watch that more carefully. And sorry about the constructor question, if that didn''t make any sense. I know there''s a way to peruse all those header files, I just can never remember how...I''ll look it up...

Thanks again for helping me understand what I had missed, and why it was wrong.

-K
quote:Does WNDCLASSEX have a constructor that takes all the members of the structure as parameters?

No, but you can inherit from it and create your own ctor. However you cannot use initialisation-list to initialise the members, but instead you have to do it Java-style.

This topic is closed to new replies.

Advertisement