Salut
J'ai un petit souci avec les property sheet,
au début avec une seul property page cela fonctionnait bien mais maintenant lorsque je permute entre 2 property page, l'initialisation fait planté le soft.

voici ce que j'ai fait:
Ceci corespond au global (property sheet)

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
COption::COption(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
	:CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
}
 
COption::COption(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
	:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
	AddPage(&m_OptionRepertoire);
	AddPage(&m_OptionVariable);
}
 
COption::~COption()
{
}
voici ma premiére page d'option (property page)
a par les action des bouttons ( rien d'exeptionnel), voici la parti initialisation que j'ai rajouté moi meme avec classwizard . C'est d'ici que commence les problémes.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
BOOL COptionRepertoire::OnInitDialog() 
{
	CPropertyPage::OnInitDialog();
 
	char Attentecdv[256];
	char EmplacementDrire[256];
	char EmplacementHist[256];
 
	GetPrivateProfileString("Emplacement Fichier CDV", "AdresseAttente", "", Attentecdv, sizeof(Attentecdv), "C:\\Documents and Settings\\DONNEE.ini");
	m_arborescence1 = Attentecdv;
 
	GetPrivateProfileString("Emplacement Fichier CDV", "AdresseDrire", "", EmplacementDrire, sizeof(EmplacementDrire), "C:\\Documents and Settings\\DONNEE.ini");
	m_ArborescenceDrire=EmplacementDrire;
 
	GetPrivateProfileString("Emplacement Fichier CDV", "AdresseHist", "", EmplacementHist, sizeof(EmplacementHist), "C:\\Documents and Settings\\DONNEE.ini");
	m_ArborescenceHist=EmplacementHist;
 
	UpdateData(FALSE);
 
	return TRUE;  
}
enfin, tout allé bien avant que je rajoute une initialisation similaire sur la property page 2.

précision, le blocage se fait lorsque je change de page dans le property.