Original Post
I want to show a dialog bar in a win32 window, so I do this: ************** case ID_TEST_CREATE_DIALOG: { HWND hdlg = CreateDialog(hInst, "DIALOG_A", hMainWnd, (DLGPROC)DialogProcDiaglog1); ShowWindow(hdlg, SW_SHOW); } break; ************** But it doesn't work, the dialog isn't created. when using MAKEINTRESOURCE(IDD_DIALOG_A), it works well and the dialog is created. I wonder how to specify the dialog box template's name?? The following is MSDN's content on this API: HWND CreateDialog(HINSTANCE hInstance, LPCTSTR lpTemplate, HWND hWndParent, DLGPROC lpDialogFunc ); and it explains the "LPCTSTR lpTemplate" parameter: This parameter is either the pointer to a null-terminated character string that specifies the name of the dialog box template or an integer value that specifies the resource identifier of the dialog box template.