Sorry for stupid questions, I'm doing everything as described in this tutorial: http://www.functionx.com/visualc/howto/calldlgfromdlg.htm
I create the dialog window and try to call another dialog in response to a button press using the following code:
CSecondDlg Dlg;
Dlg.DoModal();
Modal window appears but isn't active, and main window isn't active too and everything lags. Here is a screenshot:
And here are the definitions for my dialogs:
IDD_DIARY_TEST_DIALOG DIALOGEX 0, 0, 320, 200
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "diary_test"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
DEFPUSHBUTTON "Second",IDC_SECOND_BTN,209,179,50,14
PUSHBUTTON "Cancel",IDCANCEL,263,179,50,14
CTEXT "TODO: Place dialog controls here.",IDC_STATIC,10,96,300,8
END
IDD_SECOND_DLG DIALOGEX 0, 0, 195, 127
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_DISABLED | WS_CAPTION
CAPTION "Second"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
LTEXT "TODO: layout property page",IDC_STATIC,53,59,90,8
PUSHBUTTON "Button1",IDC_BUTTON1,61,93,50,14
END