DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
//hinstance,id,hwnd,wndproc
EndDialog(hDlg, LOWORD(wParam));
//hwnd,msgParam
//(if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) EndDialog...)
CreateDialog(hInst,(LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
//后面得接ShowWindow(hDlg,SW_SHOWNORMAL)来显示//对比DialogBox函数
CreateDialogIndirect(hInst,(LPDLGTEMPLATE)lpTemplate,hWnd,(DLGPROC)About);
MessageBoxEx(NULL,"内存不足","System Warning",MB_ICONHAND|MB_SYSTEMMODAL|MB_TOPMOST,0x0409) ;
MessageBoxIndirect(&mbp);//MSGBOXPARAMS mbp
hWnd=GetDlgItem(hDlg,IDOK);//根据父hwnd得到id的句柄
GetDlgCtrlID(hWnd)==IDOK// 根据句柄得到id
GetDlgItemText(hDlg,IDOK,szCaption,32);