title: CreateDialogParam never calls WM_INITDIALOG
body: <p>I have a dialog defined in the .rc file as:</p>
  
  <pre><code>IDD_DIALOG_AUTHENTICATION DIALOGEX 0, 0, 214, 138
  STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION
  CAPTION "Dialog"
  FONT 8, "MS Shell Dlg", 400, 0, 0x1
  BEGIN
      DEFPUSHBUTTON   "Validate",ID_BTN_VALIDATE,102,117,50,14
      PUSHBUTTON      "Exit",ID_BTN_EXIT,157,117,50,14
      LTEXT           "Username",IDC_STATIC,7,9,45,8
      CONTROL         "&lt;a&gt;SysLink&lt;/a&gt;",IDC_SYSLINK,"SysLink",WS_TABSTOP,7,99,60,14
      LTEXT           "Password",IDC_STATIC,7,25,45,8
      LTEXT           "messages",IDC_MESSAGE,7,39,197,55
      EDITTEXT        IDC_USERNAME,44,7,140,14,ES_AUTOHSCROLL
      EDITTEXT        IDC_PASSWORD,44,22,140,14,ES_PASSWORD | ES_AUTOHSCROLL
  END
  </code></pre>
  
  <p>and the ID is "IDD_DIALOG_AUTHENTICATION". CreateDialogParam is called as:</p>
  
  <pre><code>HWND hDlgWnd = CreateDialogParamW(GetModuleHandle(NULL),L"IDD_DIALOG_AUTHENTICATION", (DLGPROC)dialogProc, (LPARAM)this);
  </code></pre>
  
  <p>but it returns a null HWND and <strong>NO</strong> error code (GetLastError() == 0).</p>
  
  <p>There are several messages sent to my dialogProc function, but <strong>never</strong> WM_INITDIALOG (the messages are WM_SETFONT, 0x0090 (??), WM_DESTROY and WM_NCDESTROY)</p>
  
  <p>OS is Vista 32 bit (no SP).</p>
  
  <p>Any ideas ??</p>
  
  <p>Edited: Ok, the culprit was the SysLink control. Without it I get the WM_INITDIALOG message, and the dialog comes up fine.</p>
  
  <p>But, having the need for a SysLink control I:
  1. Link the executable with the comctl32.lib
  2. Call InitCommonControlsEx with ICC_LINK_CLASS</p>
  
  <p>However, InitCommonControlsEx fails i.e. returns FALSE, so the question now is how to get the SysLink control to show... :)</p>