Hi @ all, b4 things get serious. :icon_smile:
Im using MFC with VCPP 6.
I have a simple dialoge based app. Im using a triggered event with which I want to update the content of a CEdit box.
The ASSERT of IsWindow fails because m_hWind = 0, I figure this is because the class of the trigger event is not base on CWnd or similar.
The setup is as follows:
1. Trigger event in MainControl.cpp (not CWnd based) creates a new instance of BERT_EVAL.cpp(CTabPage based, containg edit box).
2. Member funktion of BERT_EVAL.cpp called to update CEdit content.
3. Fail at assert.
1. In trigger event (MainControl.cpp):
BERT_EVAL t_Eval = new BERT_EVAL; t_Eval.OnReceivedFPGAIND();
2. In OnReceivedFPGAIND (BERT_EVAL.cpp):
CButton *SetTxt = new CButton; SetTxt = reinterpret_cast<CButton*>(GetDlgItem(IDC_EDT_SR1)); SetRndTxt->SetWindowText("OK!");
DDX_Control(pDX, IDC_EDT_SR1, m_edt_sr1);
Note: IDC_EDT_SR1 is a CEdit Control.
As far as I understand the problem either at the time of assertion the window does not exist. The question is why since I create an instance of BERT_EVAL which is CTabPage based.
Thx in advance.