title: Win32: CreateDialog instead of multiple calls to CreateWindow - any downsides?
body: <p>I'm currently working on a Win32 program which requires a main window containing many child window controls - buttons, listviews and so on. I believe the standard way to build such a window is to first call CreateWindow for the main window, then again for each of the controls.</p>
  
  <p>As an easier option, I'm considering designing the main window using the resource editor's dialog box designer, then using CreateDialog to build the main window in one go.</p>
  
  <p>By using a CLASS statement in the dialog box template, I should be able to get the main window to use a custom window class (and hence a custom window procedure) and thus avoid the window having any dialog-like behaviour. An example of this technique can be found in Charles Petzold's "Programming Windows": <a href="ftp://ftp.charlespetzold.com/ProgWin5/Chap11/HexCalc/">the HEXCALC program in chapter 11</a>.</p>
  
  <p>Are there any downsides to creating my main window in this way? If so, what are they? If not, why is this approach rarely used?</p>