Bonjour j'ai une sdi affichant au lancement une fenetre demandant de faire un choix
Chaque choix devra permettre d'afficher une autre boite de dialogue pour lesquelles g deja crée les classes.
Mon pb est que je n'arrive pas à ouvrir ces boits quand je clique sur un bouton de la 1ere fenetre affichée.
Alors il faudrait préciser quelle librairie tu utilises,et aussi le reste du code en mettant les balises codes stp...
Merci
__________________________
Be C++ Mon Blog (C++, Intelligence Artificielle, Prolog)
Quel IDE ? Quelle GUI ?
Merci de déplacer ce sujet dans le sous-forum correspondant, apparement IDE.
__________________________
Lisez la charte, pensez à regarder la FAQ, les tutoriaux, l'annuaire et faites une recherche dans les forums.
N'oubliez pas le Tag [Résolu].
mon sdi a une base de Cfontview
voila le code d ela 1ere boite
// CChoixDlg dialog
CChoixDlg::CChoixDlg(CWnd* pParent /*=NULL*/)
: CDialog(CChoixDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CChoixDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CChoixDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CChoixDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CChoixDlg, CDialog)
//{{AFX_MSG_MAP(CChoixDlg)
ON_BN_CLICKED(IDC_SATELLITE, OnSatellite)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChoixDlg message handlers
void CChoixDlg::OnBouton1()
{
CBoite2Dlg boDlg;
boDlg.DoModal();
}
pour les autres boites de dialogue c pareil
et la le code "principal"
BEGIN_MESSAGE_MAP(CGPSApp, CWinApp)
//{{AFX_MSG_MAP(CGPSApp)
ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
// Standard print setup command
ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CGPSApp construction
CGPSApp::CGPSApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CGPSApp object
CGPSApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CGPSApp initialization
BOOL CGPSApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
// Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
// Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and views.
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CGPSDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CGPSView));
AddDocTemplate(pDocTemplate);
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// The one and only window has been initialized, so show and update it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return TRUE;
}
Une balise, c'est [ code ] ou [ quote ] afin de mieux structurer le code, je l'ai fait pour toi, pour les mettre, il suffit de cliquer sur les boutons au dessus de la partie ou on écrit, ce sont :
B : Gras
i : italique
u : sousligné
Code : mettre le texte en forme de code
citation : pour citer
lien : pour créer un lien hypertexte
image : ajouter une image
J'ai aussi déplacé le sujet dans le bon forum.
__________________________
Lisez la charte, pensez à regarder la FAQ, les tutoriaux, l'annuaire et faites une recherche dans les forums.
N'oubliez pas le Tag [Résolu].
Pour ce qui est d'ouvrir des boites de dialogue, y arrives-tu en dehors de ce programme ?
__________________________
Lisez la charte, pensez à regarder la FAQ, les tutoriaux, l'annuaire et faites une recherche dans les forums.
N'oubliez pas le Tag [Résolu].