This message is sent to the dialog procedure, before the dialog box is shown, thereby offering the dialog procedure the opportunity to perform the initialization of the dialog box.
If any string substitutions are made by the WinSubstituteStrings call when the dialog is created, the WM_SUBSTITUTESTRING message may have been sent before the WM_INITDLG message is sent.