Ne s'affiche pas dans la barre des taches
Re !
Voici mon probleme :
J'ai crée une application avec vc++ 6.0.
Donc j'ai les fichiers de départ "Projet.cpp ; ProjetDoc.cpp ; ProjetView.cpp"
Dans la méthode OnInitialUpdate() de "ProjetView.cpp" , j'ai mis du code. (jusque la , pas de problemes visibles). j'ai rajouté une CDialog Modal et je l'execute dans cette méthode.
Le souci c'est que l'application n'est pas encore dans la barre des taches, donc si je perds ma CDialog lancée, l'application continu de tourner sans que l'utilisateur puisse la quitter.
Mon but est d'afficher une boite de login au lancement de l'application.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| void CToolCsvTxtView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
Login Box;
if(Box.DoModal()==IDOK)
{
if(!Box.getUser()->m_Type==true)
{
CButton *pButton =static_cast<CButton *>(GetDlgItem(ID_CREATE)) ;
pButton->ShowWindow(false);
pButton=static_cast<CButton *>(GetDlgItem(IDC_DELETE)) ;
pButton->ShowWindow(false);
pButton=static_cast<CButton *>(GetDlgItem(IDC_DUPLICATE)) ;
pButton->ShowWindow(false);
pButton=static_cast<CButton *>(GetDlgItem(IDC_RENAME)) ;
pButton->ShowWindow(false);
pButton=static_cast<CButton *>(GetDlgItem(IDC_BUTTON1)) ;
pButton->ShowWindow(false);
pButton=static_cast<CButton *>(GetDlgItem(IDC_BUTTON3)) ;
pButton->ShowWindow(false);
}
this->m_CListView.InsertColumn(0,"Name",LVCFMT_LEFT,150);
this->m_CListView.InsertColumn(1,"Description",LVCFMT_LEFT,150);
this->m_CListView.InsertColumn(2,"Date Validation",LVCFMT_LEFT,100);
this->m_CListView.InsertColumn(3,"Validate ?",LVCFMT_LEFT,100);
ReadDir();
m_CListView.SetExtendedStyle(m_CListView.GetExtendedStyle() | LVS_EX_FULLROWSELECT);
}
else
{
}
} |