I have a dialog box based application (MFC - VS 2008). I have a list control on it. I pop up other dialog boxes, but I also want to be able to get back to the parent app dialog. I can get back to the parent app dilaog box, but the problem is that even if I click on it with the mouse it remains hidden behind the "child" windows.
I want it to come to the front.
There is probably something obvious I am doing wrong. What do I need to do to make the parent window come to the front when it has focus? I assume there is some property on the child dlg that should not be there, or something missing
I can post the rc code if that helps.
EDIT:
here is the .rc code for the two dialog boxes. The first is the mainframe window.
The second is launched with the following code:
HistogramWindow *histwind;
histwind = new HistogramWindow(this);
histwind->Create(IDD_DIALOG_HISTOGRAM);
histwind->ShowWindow(SW_SHOW);
IDD_DTHISTOGRAMDLG_DIALOG DIALOGEX 0, 0, 320, 200
STYLE DS_SETFONT | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "dtHistogramDlg"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,209,179,50,14,NOT WS_VISIBLE
PUSHBUTTON "Cancel",IDCANCEL,263,179,50,14,NOT WS_VISIBLE
CONTROL "",IDC_LIST_SYMBOL_SETS,"SysListView32",LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,7,60,50
END
IDD_DIALOG_HISTOGRAM DIALOGEX 0, 0, 317, 184
STYLE DS_SETFONT | DS_FIXEDSYS | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "Histogram"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,205,163,50,14,NOT WS_VISIBLE
PUSHBUTTON "Cancel",IDCANCEL,260,163,50,14,NOT WS_VISIBLE
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME,7,7,20,20
END