   [Code] Writing a Win32 Window Class Wrapper, Update
LinkNote: This is SiCrane's update to my old article, addressing a number of the issues I have with it as well as changes in the Win32 environment in the intervening years.   
  One note from the original submission e-mail that may be useful to whoever gets this:Quote:I'm not too attached to the generic text mapping appendix, but including it seemed like the least bad alternative between (a) including the appendix to explain generic text mapping, (b) writing the sample application with generic text mappings but without explaining them or (c) writing sample application so that it compiles under only UNICODE or MBCS. Choice c being particularly bad now that MSVC 2005 defaults to UNICODE mode and most other compilers defaulting to narrow character mode.;  Ok, it's been a week now. Would someone get in here and review/edit this thing already?   ;  Hmm, it's a difficult one. Perhaps would be good as a sweet snippet as it's pretty short without the original text. If I were to add more to this, it'd be to start adding an auto-dispatch/registry to the main window class so that messages get passed to their relevant functions/functors auotmagically.Is that in scope for this, do you think?   ;  I'm fine with it going to the sweet snippets. Setting up a window class isn't something that should be a big production.However, I'm against adding an automatic functor dispatch mechanism (a) because members of the target audience, beginners manually programming Win32 code, aren't usually receptive to higher level constructs such as functor interfaces and (b) because that's one of the parts identified in the original version that needed to be taken out. Basically, once you start adding in stuff like that you might as well just recommend someone to use MFC, ATL, VCL or .NET instead.   ;  Fair point. In that case, I have no problems with it myself. You could do with linking to the original article as a reference, unless you intend to take it down of course.   ;  Whether we leave it up is up to Oluseyi, but I don't think linking to it is the right choice either way since there are a few problems with the old article. One of the biggest, if not the biggest, being that it doesn't include a source archive and the code in the article isn't compilable on its own.   ;  Remove the old article entirely. Or, at least, don't link to it.   ;  In that case the article should be good to go as is; the article should already be formatted properly.   ;  Noticed a spelling error. Uploaded a new copy.   