08-18-2009, 06:59 AM
In dialog2 insert OutWinMsg to see what messages it receives when minimizing. Possibly it is WM_SYSCOMMAND with certain code. Read about it in MSDN. When the message is received, minimize owner: min GetWindow(hDlg GW_OWNER).