المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Dialog created in Taskbar



C++ Programming
01-26-2010, 01:20 PM
i have created two modeless dailog and invoking it in InitInstance().
That two dialog is displayed correctly.But what happened is, the second dialog creates icon in Taskbar like main applcation seperatley apart form main application.It has its own close,Move menu option.
How its possible.I posted my code below.
In InitInstance()
pMainFrame->AlarmBanner();
pMainFrame->ToolTab();
void CMainFrame::AlarmBanner()
{
CAlarmBanner *oAbanner;
oAbanner = new CAlarmBanner;
oAbanner->Create(IDD_ALARMBANNER,this);
oAbanner->ShowWindow(SW_NORMAL);

}
void CMainFrame::ToolTab()
{
CToolTab *otoolbar;
otoolbar = new CToolTab;
otoolbar->Create(IDD_TOOLBAR_DIALOG,this);
otoolbar->ShowWindow(SW_NORMAL);
}
BOOL CToolTab::OnInitDialog()
{
CDialog::OnInitDialog();
m_brush.CreateSolidBrush(RGB(173, 216, 230));
SetWindowPos(&CWnd::wndBottom,0,80,45,SystemDM.dmPelsHeight,SWP_SHOWWINDOW);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
BOOL CAlarmBanner::OnInitDialog()
{
CDialog::OnInitDialog();

SetWindowPos(&CWnd::wndBottom,0,0, SystemDM.dmPelsWidth, SystemDM.dmPelsHeight/12, SWP_SHOWWINDOW);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}

Anu