Win32 Windows and classes again. Something wrong...

Started by
23 comments, last by ANSI2000 22 years, 1 month ago
Well you can make a constructor "fail" by throwing an exception.
Advertisement
ANSI2000 has a point about inducing a constructor failure.

However, ANSI... I don''t think I mentioned this, but I originally intended this to be used for getting a window up and running with very little code, and condensed the abstraction of WNDCLASS with an actual instance of such.

If you wish to make multiple instances, or even a more complex windows-based GUI, you really should separate these abstractions as they should be. Something like Window vs. WindowDesc (or your own analogous term) comes to mind.

If this is the case, I definitely think the separation would be a much cleaner design, and I highly recommend reading the windows programming sections at this site.

For a simple one-window app however, I think you''re still in the clear.

"Don''t be afraid to dream, for out of such fragile things come miracles."
Well for now I just wanted to rearange things a bit in the class the way I understand it. Eventually I will massage it around even more...

Ill check out the link...

Thanks.
If someone hasn''t mentioned it, there''s wxWindows (check sourceforge). It''s a cross-platform GUI, OO widget based IIRC.

You could either use it, or look at thier design for inspiration.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Yep seen it... Thanks for reminding me the name

This topic is closed to new replies.

Advertisement