具体可以看一下msdn:CreateDialog
The CreateDialog function uses the CreateWindowEx function to create the dialog box. CreateDialog then sends a WM_INITDIALOG message to the dialog box procedure. The function displays the dialog box if the template specifies the WS_VISIBLE style. Finally, CreateDialog returns the window handle to the dialog box.
After CreateDialog returns, the application displays the dialog box (if it is not already displayed) by using the ShowWindow function. The application destroys the dialog box by using the DestroyWindow function.
Microsoft® Windows® CE does not support all styles in the DLGTEMPLATE structure. This structure is in the template identified by the lpTemplate parameter.