a short question ?!

Is it possible to implant a ( docking )tool-bar into dialog-based application ?
And what about a docking menu into dialog-based application ?
Thank YOU !
[167 byte] By [LACHEZAR] at [2007-11-17 11:50:09]
# 1 Re: a short question ?!
For toolbar:
http://dev-archive.earthweb.com/dialog/index.shtml (and search for 'toolbar')

To attach a menu to a dialog:
Handle the WM_INITDIALOG and WM_CLOSE messages in the dialog class as follows:

BOOL CMydlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Load the IDR_MYFRAME menu.
pNewMenu = new CMenu;
pNewMenu->LoadMenu(IDR_MYFRAME);
// Set the mainframe menu to mainframe or if Dialog use this.
((CMainFrame *)AfxGetMainWnd())->SetMenu(pNewMenu);
//or this->SetMenu(pNewMenu);
return TRUE;
}

void CMydlg::OnClose()
{
// Detach the previous HMenu handle from the object.
pNewMenu->Detach();
//the following is the code to restore your earlier Menu. otherwise just GET OUT of here ; means OnClose();
pNewMenu->LoadMenu(IDR_MAINFRAME);
// Restore the mainframe menu.
((CMainFrame *)AfxGetMainWnd())->SetMenu(pNewMenu);
CDialog::OnClose();
}

Good luck

best regards,

Moshe Yakobovich
i dont know if rating helps - but it worths giving it a shot...
mosheY at 2007-11-10 8:06:52 >