int Result=DialogBox(hInst,MAKEINTRESOURCE(IDD_YOUR_DIALOG_ID),hWnd,(DLGPROC)TestDlgProc);
If the function fails because the hWndParent parameter is invalid, the return value is zero. The function returns zero in this case for compatibility with previous versions of Windows. If the function fails for any other reason, the return value is –1. To get extended error information, call GetLastError.