StatusBar dans une boite de dialogue

Quemar Messages postés 17 Date d'inscription jeudi 30 juillet 2009 Statut Membre Dernière intervention 3 juillet 2009 - 25 mai 2005 à 16:45
alefoye Messages postés 2 Date d'inscription vendredi 3 octobre 2003 Statut Membre Dernière intervention 14 mars 2006 - 14 mars 2006 à 00:05
Bonjour,



je n'arrive pas a afficher une Status Bar dans ma boite de dialogue

mon application est une application basee sur une boite de dialogue (avec VisualC++ .NET)



Voila ce que je fais:



if (!m_StatusBar.Create(this,WS_CHILD | WS_VISIBLE | CBRS_BOTTOM,ID_STATUS) ||

!m_StatusBar.SetIndicators(indicators,

sizeof(indicators)/sizeof(UINT)))

{

TRACE0("Impossible de créer la barre d'état\n");

return -1; // échec de la création

}

m_StatusBar.SetPaneInfo(0,0,0,50);

m_StatusBar.SetPaneInfo(1,0, SBPS_STRETCH, 50);

m_StatusBar.SetPaneText(0, "SALUT cmoi");

m_StatusBar.SetPaneText(1, "Encoremooi");

BOOL pp;

pp = m_StatusBar.ShowWindow(SW_SHOWNORMAL);





mais helas aucune barre de Status ne s'affiche???

que dois je faire de plus ?????



Merci

3 réponses

Quemar Messages postés 17 Date d'inscription jeudi 30 juillet 2009 Statut Membre Dernière intervention 3 juillet 2009
25 mai 2005 à 16:46
oui aussi je fais ca ds OnInitDialog
0
Quemar Messages postés 17 Date d'inscription jeudi 30 juillet 2009 Statut Membre Dernière intervention 3 juillet 2009
25 mai 2005 à 16:48
aussi j'ai declare Indicator :



static UINT indicators[] =

{

ID_SEPARATOR, // indicateur de la ligne d'état

ID_INDICATOR_CAPS,

ID_INDICATOR_NUM,

ID_INDICATOR_SCRL,

};
0
alefoye Messages postés 2 Date d'inscription vendredi 3 octobre 2003 Statut Membre Dernière intervention 14 mars 2006
14 mars 2006 à 00:05
dans le .H

CStatusBarCtrl m_StatusBar;

dans le .CPP

void CMyDialog::OnInitDialog
{
m_StatusBar.Create(WS_CHILD|WS_VISIBLE|SBT_OWNERDRAW,CRect(0,0,0,0), this, 0);


// You can set the no. of parts of the StatusBar (4 in this case)
// and the width of each part not -1 means remaining width


int strPartDim[4]= {180, 260, 340, -1};
m_StatusBar.SetParts(4, strPartDim);


m_StatusBar.SetText(_T("Dialog / StatusBar / Toolbar"),0,0);
m_StatusBar.SetText(_T("Example"), 1, 0);

CString string;
string.LoadString(IDS_MYCOMPUTER);
m_StatusBar.SetText(string, 3 ,SBT_NOBORDERS );
m_StatusBar.SetIcon(3, SetIcon(AfxGetApp()->LoadIcon(IDI_COMP), FALSE));
}
0
Rejoignez-nous