Multi CDialog problem!

Mar 7, 2012 at 8:09am
i cant seem to find the pointers to my other Dlg i have created, i want to be able to access these pointers as soon as the app has opened...

this is what i've been trying

1
2
BDlg = (CBClass*)AfxGetMainWnd(); <- not finding the correct pointer
CDlg = (CCClass*)AfxGetMainWnd(); <- same


ADlg is the main dialog, with BDlg and CDlg set in the app, the question is how do i properly get the pointers to BDlg and CDlg so i can use those pointers with my other classes, what is the best and fastest way?
Last edited on Mar 7, 2012 at 8:25am
Mar 7, 2012 at 12:12pm
Did you set the main window? You can only have one main window.
Topic archived. No new replies allowed.