Click here to Skip to main content
15,895,256 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: char* as return type in dll Pin
Stuart Dootson14-Jun-09 2:26
professionalStuart Dootson14-Jun-09 2:26 
GeneralRe: char* as return type in dll Pin
_808614-Jun-09 4:13
_808614-Jun-09 4:13 
GeneralRe: char* as return type in dll Pin
_808614-Jun-09 4:21
_808614-Jun-09 4:21 
GeneralRe: char* as return type in dll Pin
0x3c014-Jun-09 6:44
0x3c014-Jun-09 6:44 
QuestionWhere does VC9 store its run time type info? Pin
followait13-Jun-09 16:55
followait13-Jun-09 16:55 
AnswerRe: Where does VC9 store its run time type info? Pin
harold aptroot13-Jun-09 22:44
harold aptroot13-Jun-09 22:44 
AnswerRe: Where does VC9 store its run time type info? Pin
Stuart Dootson14-Jun-09 2:26
professionalStuart Dootson14-Jun-09 2:26 
QuestionPassing CDialog results to CFormView ?? Pin
Vaclav_13-Jun-09 15:45
Vaclav_13-Jun-09 15:45 
I need to configure some application variables. I have a CFormView and via menu conmstruct a simple CDialog. However, after DoModal returns TDOK I am unable to retrieve the CComboBox selection - not even the GetCount returns number of items in the CComboBox. I seldom use CDialog but this got me stumped, I am obviously missing an important piece of code.

Thanks for reading and your help is as always appreciated.

Here is the offending code:



void CFD2008View::OnConfigureSetup()
{
    
     CString strText;
     CComboBox* pCombo10;
     int nIndex;
     int nCount;


     // verify document  
     if(!m_CFD2008Doc)
          m_CFD2008Doc = GetDocument();

     VERIFY (m_CFD2008Doc);

     CDialog dlg(IDD_DIALOG1);
    
     if (dlg.DoModal()==IDOK){

          TRACE("\nvoid CFD2008View::OnConfigureSetup() ");

          pCombo10 = (CComboBox *) GetDlgItem(IDC_COMBO10);
          VERIFY(pCombo10);

          nIndex = pCombo10->GetCurSel();

//always returns 0
         
                        nCount = pCombo10->GetCount();
// always returns 0

     }
}
AnswerRe: Passing CDialog results to CFormView ?? Pin
Stuart Dootson14-Jun-09 2:21
professionalStuart Dootson14-Jun-09 2:21 
AnswerRe: Passing CDialog results to CFormView ?? Pin
krmed14-Jun-09 4:23
krmed14-Jun-09 4:23 
GeneralRe: Passing CDialog results to CFormView SOLVED Pin
Vaclav_14-Jun-09 14:10
Vaclav_14-Jun-09 14:10 
QuestionEncryption / Decryption Pin
queries36513-Jun-09 10:01
queries36513-Jun-09 10:01 
QuestionDoubt - C [modified] Pin
musiclover9113-Jun-09 8:10
musiclover9113-Jun-09 8:10 
AnswerRe: Doubt - C Pin
_808613-Jun-09 21:47
_808613-Jun-09 21:47 
AnswerRe: Doubt - C Pin
killabyte14-Jun-09 1:28
killabyte14-Jun-09 1:28 
AnswerRe: Doubt - C Pin
Stuart Dootson14-Jun-09 2:19
professionalStuart Dootson14-Jun-09 2:19 
GeneralRe: Doubt - C Pin
musiclover9118-Jun-09 23:19
musiclover9118-Jun-09 23:19 
Questiontypedef struct constructor Pin
akira3213-Jun-09 6:50
akira3213-Jun-09 6:50 
AnswerRe: typedef struct constructor Pin
Ozer Karaagac13-Jun-09 7:20
professionalOzer Karaagac13-Jun-09 7:20 
QuestionHelp - Capture window to bitmap Pin
softwaremonkey13-Jun-09 5:25
softwaremonkey13-Jun-09 5:25 
AnswerRe: Help - Capture window to bitmap Pin
Randor 13-Jun-09 7:38
professional Randor 13-Jun-09 7:38 
GeneralRe: Help - Capture window to bitmap Pin
softwaremonkey13-Jun-09 21:24
softwaremonkey13-Jun-09 21:24 
QuestionCompare Images. Pin
FISH78613-Jun-09 5:18
FISH78613-Jun-09 5:18 
AnswerRe: Compare Images. Pin
Randor 13-Jun-09 6:12
professional Randor 13-Jun-09 6:12 
AnswerRe: Compare Images. Pin
PJ Arends13-Jun-09 6:29
professionalPJ Arends13-Jun-09 6:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.