Dialog box question
-
I use api and I have a question DialogBox(hInst, MAKEINTRESOURCE(IDD_AUTHORIZATION), main_hwnd, (DLGPROC)authDialog); where main_hwnd is a handler to the parent window. But when the dialog box appears it is not shown relatively to the parent window. Relatively I mean at the center. Could you help me how to change the code to set the dialog box at the center of parent window?
-
I use api and I have a question DialogBox(hInst, MAKEINTRESOURCE(IDD_AUTHORIZATION), main_hwnd, (DLGPROC)authDialog); where main_hwnd is a handler to the parent window. But when the dialog box appears it is not shown relatively to the parent window. Relatively I mean at the center. Could you help me how to change the code to set the dialog box at the center of parent window?
-
CDialog *pDlg=(CDialog *)GetDlgItem(IDD_AUTHORIZATION);
BOOL bCenter=pDlg->CenterWindow(main_hwnd);~RaGE();
OK but I said I use api windows not MFC. Any suggestions?